This is an archive of the discontinued LLVM Phabricator instance.

Add flag to dump the labels when the program terminates.
ClosedPublic

Authored by martignlo on Nov 18 2014, 6:07 AM.

Diff Detail

Event Timeline

martignlo updated this revision to Diff 16326.Nov 18 2014, 6:07 AM
martignlo retitled this revision from to Add flag to dump the labels when the program terminates..
martignlo updated this object.
martignlo edited the test plan for this revision. (Show Details)
martignlo added a reviewer: pcc.
martignlo added a subscriber: Unknown Object (MLST).
martignlo updated this revision to Diff 16328.Nov 18 2014, 6:19 AM

I previously used the wrong diff. Sorry!

martignlo updated this revision to Diff 16329.Nov 18 2014, 6:23 AM

Added test.

pcc added inline comments.Nov 18 2014, 12:16 PM
lib/dfsan/dfsan.cc
277 ↗(On Diff #16329)

You can skip index 0.

342 ↗(On Diff #16329)

The other sanitizers use atexit for this type of thing.

test/dfsan/dump_labels.c
3 ↗(On Diff #16329)

You should also test the case where the program terminates due to running out of labels.

martignlo updated this revision to Diff 16382.Nov 19 2014, 5:29 AM
martignlo added inline comments.Nov 19 2014, 5:31 AM
lib/dfsan/dfsan.cc
277 ↗(On Diff #16329)

Done.

342 ↗(On Diff #16329)

Moved the registration to dfsan_init.

test/dfsan/dump_labels.c
3 ↗(On Diff #16329)

Done.

martignlo updated this revision to Diff 16383.Nov 19 2014, 5:32 AM
pcc accepted this revision.Nov 19 2014, 12:09 PM
pcc edited edge metadata.

LGTM

test/dfsan/dump_labels.c
58 ↗(On Diff #16383)

You could add a CHECK-OOL-NOT line to make sure this line is not printed.

This revision is now accepted and ready to land.Nov 19 2014, 12:09 PM
martignlo updated this revision to Diff 16423.Nov 20 2014, 1:59 AM
martignlo edited edge metadata.
martignlo added inline comments.
test/dfsan/dump_labels.c
58 ↗(On Diff #16383)

Dropped since the exitstatus already captures this.

martignlo closed this revision.Nov 20 2014, 2:01 AM
martignlo updated this revision to Diff 16424.

Closed by commit rL222425 (authored by @martignlo).