ramosian-glider / sanitizers

0 stars 0 forks source link

When printing report on SEGV, disassemble the faulty instruction and print accesses READ-or-WRITE and size #115

Open ramosian-glider opened 9 years ago

ramosian-glider commented 9 years ago

Originally reported on Google Code with ID 114

Subj. 
Will probably need the external symbolizer. 

Reported by konstantin.s.serebryany on 2012-09-24 09:17:16

ramosian-glider commented 9 years ago
A random thought: my debug printf in mach_override used to print 16 bytes starting at
the needed address in the following manner:
==================================
void foo() {
asm volatile("nop;nop;nop;nop;");
asm volatile(".byte 0x48, 0xb8, 0xa0, 0x7, 0xe0, 0xff, 0xff, 0x7f;");
asm volatile(".byte 0x0, 0x0, 0xff, 0xe0, 0x55, 0x48, 0x89, 0xe5;");
}
==================================
and then suggested the user to write this down into a .c file, compile it with gcc
and disassemble with objdump.

We could probably do the same under a flag: anyway the faulty instruction is needed
for manual crash analysis and the user himself can do these steps.

Reported by ramosian.glider on 2012-09-24 10:42:37

ramosian-glider commented 9 years ago
DR's x86 assembler can be built as a static library with (I think) no libc imports.
 I'm sure there are better disassemblers out there, but the nice thing about ours is
that it's probably pretty safe to call from a signal handler.

It may or may not be worth the hassle of dependency, though.

Reported by rnk@google.com on 2012-09-28 13:24:24

ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2015-07-30 09:05:30

ramosian-glider commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:06:55