I noticed that GetPreviousInstructionPc() function returns 'pc - 1' for 
both arm32 and arm64.
This causes odd addresses to appear in stack traces, which is nonsense, as 
both arm32/64 instructions 
have 4 byte size and alignment.

The x86 and x86_64 cases are even more confusing, because instruction 
length is not constant. What exactly this 'pc - 1' is expected to return?

But even if one is able to get previous instruction address correctly he 
may still get confusing results. In case some instruction triggers
hardware exception, its address will go to ASAN stack trace (via 
SlowUnwindStackWithContext). Returning address of previous instruction
in such case can be extremely confusing.

Is there any point in using this function?

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to address-sanitizer+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to