[x86/Linux] Fix "Bad opcode" assert in unwindLazyState (#8609)
authorJonghyun Park <parjong@gmail.com>
Wed, 14 Dec 2016 00:46:40 +0000 (09:46 +0900)
committerJan Kotas <jkotas@microsoft.com>
Wed, 14 Dec 2016 00:46:40 +0000 (16:46 -0800)
commit2a7f2ffeb1b6a39f295cc819d3e1187bcc0507a0
treed1f4825cda06060b23eae590b0036d11465955d5
parent71d73fc56b9dc295d1f9ffcc7882e8b0765d10d6
[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.
compileoptions.cmake
src/vm/i386/gmsx86.cpp