[PATCH] [ASan] Really fix zero_page_pc test for PowerPC

Jay Foad jay.foad at gmail.com
Wed Nov 12 02:44:37 PST 2014


Hi kcc, glider, samsonov,

As a follow-up to D6167, this patch fixes the test to account for
another difference between PowerPC and x86 systems.

On x86 if you branch to an invalid address, you get a SIGSEGV with PC
set to the invalid address (and si_addr in the siginfo struct also set
to the same address).

On PowerPC, you get a SIGSEGV with PC pointing at the branch
instruction, but si_addr set to the invalid address.

You can see this difference if you run the test case under gdb.

http://reviews.llvm.org/D6226

Files:
  test/asan/TestCases/zero_page_pc.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6226.16080.patch
Type: text/x-patch
Size: 399 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141112/476875f7/attachment.bin>


More information about the llvm-commits mailing list