This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] Add test for origin tracking stack traces
ClosedPublic

Authored by gbalats on Apr 14 2021, 6:27 PM.

Diff Detail

Event Timeline

gbalats requested review of this revision.Apr 14 2021, 6:27 PM
gbalats created this revision.
Herald added a subscriber: Restricted Project. · View Herald TranscriptApr 14 2021, 6:27 PM

We have test cases about origin tracking stacks. See compiler-rt/test/dfsan/origin_*.c
Does this one check any thing uncovered by existing cases?

We have test cases about origin tracking stacks. See compiler-rt/test/dfsan/origin_*.c
Does this one check any thing uncovered by existing cases?

In most test cases I saw, the the stack trace had just main. This test would focus on more complicated cases. I also intend to expand it in the future to include origin tracing APIs that use vectors instead.

compiler-rt/test/dfsan/origin_stack_trace.c
44

This is not used yet.

gbalats added inline comments.Apr 15 2021, 3:16 PM
compiler-rt/test/dfsan/origin_stack_trace.c
44

This is special FileCheck syntax that you can add to check if a line occurs multiple times.
See https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-count-directive.

This revision is now accepted and ready to land.Apr 15 2021, 3:18 PM
compiler-rt/test/dfsan/origin_stack_trace.c
44

Sorry. I forgot this feature completely...

This revision was automatically updated to reflect the committed changes.