summaryrefslogtreecommitdiff
path: root/compileoptions.cmake
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2016-12-14 09:46:40 +0900
committerJan Kotas <jkotas@microsoft.com>2016-12-13 16:46:40 -0800
commit2a7f2ffeb1b6a39f295cc819d3e1187bcc0507a0 (patch)
treed1f4825cda06060b23eae590b0036d11465955d5 /compileoptions.cmake
parent71d73fc56b9dc295d1f9ffcc7882e8b0765d10d6 (diff)
downloadcoreclr-2a7f2ffeb1b6a39f295cc819d3e1187bcc0507a0.tar.gz
coreclr-2a7f2ffeb1b6a39f295cc819d3e1187bcc0507a0.tar.bz2
coreclr-2a7f2ffeb1b6a39f295cc819d3e1187bcc0507a0.zip
[x86/Linux] Fix "Bad opcode" assert in unwindLazyState (#8609)
* [x86/Linux] Fix "Bad opcode" assert in unwindLazyState This commit suppresses "Bad opcode" assert while runing "Hello, World" example. This commit address the following three code patterns discovered while digging the assert failure: - and $0x1, %al - xor $0xff, %al - stack protection code: mov %gs:<off>, <reg> cmp <off>(%esp), <reg> mov <reg>, <off>($esp) jne <disp32> This commit revises LazyMachState::unwindLazyState to handle the first two patterns, and revises compile options not to emit the third pattern.
Diffstat (limited to 'compileoptions.cmake')
-rw-r--r--compileoptions.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/compileoptions.cmake b/compileoptions.cmake
index 75d51fd5bb..7baa86baf1 100644
--- a/compileoptions.cmake
+++ b/compileoptions.cmake
@@ -15,7 +15,11 @@ if (CLR_CMAKE_PLATFORM_UNIX)
# We cannot enable "stack-protector-strong" on OS X due to a bug in clang compiler (current version 7.0.2)
add_compile_options(-fstack-protector)
else()
- add_compile_options(-fstack-protector-strong)
+ if(NOT CLR_CMAKE_PLATFORM_ARCH_I386)
+ # x86 unwinder cannot handle stack protection code, yet
+ # see https://github.com/dotnet/coreclr/issues/8625 for details
+ add_compile_options(-fstack-protector-strong)
+ endif(NOT CLR_CMAKE_PLATFORM_ARCH_I386)
endif(CLR_CMAKE_PLATFORM_DARWIN)
add_definitions(-DDISABLE_CONTRACTS)