This is an archive of the discontinued LLVM Phabricator instance.

[Asan][Windows] Fix asan stack traces on Windows.
ClosedPublic

Authored by akhuang on Oct 22 2020, 5:13 PM.

Details

Summary

While implementing inline stack traces on Windows (https://reviews.llvm.org/D88988)
I noticed that the stack traces in many asan tests included an extra frame.

Currently we get the PC and then do a stack unwind and use the PC to
find the beginning of the stack trace.
In the failing tests the first thing in the stack trace is inside an inline
call site that shouldn't be in the stack trace, so replace it with the PC.

This change prevents tests from failing if we have inline stack traces.

Diff Detail

Event Timeline

akhuang created this revision.Oct 22 2020, 5:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2020, 5:13 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
akhuang requested review of this revision.Oct 22 2020, 5:13 PM

can you please add a test?

I'm not sure how to test, since the stack trace is only incorrect if we have inline stack frames, which we don't have at the moment (being implemeneted in https://reviews.llvm.org/D88988).

akhuang edited the summary of this revision. (Show Details)Oct 22 2020, 5:26 PM
rnk accepted this revision.Oct 23 2020, 9:30 AM

I think we have enough coverage. The commit message indicates that this will fix the test failures we observe when inline frames are added.

This revision is now accepted and ready to land.Oct 23 2020, 9:30 AM
This revision was automatically updated to reflect the committed changes.