This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] Add custom function for pthread_create.
ClosedPublic

Authored by pcc on Aug 23 2013, 6:59 PM.

Diff Detail

Event Timeline

eugenis added inline comments.Aug 27 2013, 1:45 AM
lib/dfsan/dfsan_custom.cc
285 ↗(On Diff #3736)

I'm slightly confused. This would be the label for the thread return value, right? Don't you need to keep it somewhere for pthread_join()?

lib/dfsan/lit_tests/custom.c
138 ↗(On Diff #3736)

You are not testing any label-passing behavior of pthread_create() at all.

pcc updated this revision to Unknown Object (????).Aug 27 2013, 2:41 PM
  • Check the label of the callback argument
lib/dfsan/dfsan_custom.cc
285 ↗(On Diff #3736)

I think that propagating labels through pthread_create and pthread_join can be done in a separate change. But for now I am fixing the more fundamental bug that the pthread_create callback argument can receive an invalid nonzero label due to an ABI mismatch.

lib/dfsan/lit_tests/custom.c
138 ↗(On Diff #3736)

I now test that the argument is unlabelled.

eugenis accepted this revision.Aug 28 2013, 1:59 AM

LGTM

pcc closed this revision.Aug 28 2013, 1:21 PM

Closed by commit rL189502 (authored by @pcc).