This is an archive of the discontinued LLVM Phabricator instance.

[msan] Don't delete MSanAtExitRecord
ClosedPublic

Authored by vitalybuka on Feb 13 2019, 5:42 PM.

Details

Summary

Pre 2.27 libc can run same atexit handler twice
We will keep MSanAtExitRecord and reset fun to mark it as executed.

Fix PR40162

Diff Detail

Event Timeline

vitalybuka created this revision.Feb 13 2019, 5:42 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 13 2019, 5:42 PM
Herald added subscribers: llvm-commits, Restricted Project, jdoerfert, jfb. · View Herald Transcript
eugenis added inline comments.Feb 13 2019, 6:03 PM
compiler-rt/test/msan/cxa_atexit_race.cc
24 ↗(On Diff #186781)

I'm not sure about this .The other thread can register _a lot_ of handlers in one second.

25 ↗(On Diff #186781)

return 0 and remove "not" before "%run" ?

eugenis accepted this revision.Feb 13 2019, 6:34 PM

LGTM

compiler-rt/test/msan/cxa_atexit_race.cc
14 ↗(On Diff #186785)

Please use an atomic!

This revision is now accepted and ready to land.Feb 13 2019, 6:34 PM
vitalybuka marked 3 inline comments as done.Feb 13 2019, 6:50 PM
This revision was automatically updated to reflect the committed changes.

The test added here is intermittently hanging on our AArch64 buildbot.

This can either manifest itself as a the whole step timing out, or the test failing:

By running just the test continuously on an Ubuntu 16.04 machine I can get it to hang. The machine seems to need to be heavily loaded before this happens though. I've tried on another Ubuntu 16.04 machine that isn't loaded and I can't get it to hang. On the face of it, it looks like whatever fix worked for x86 hasn't worked for AArch64. Have you any suggestions on how to proceed? The obvious solution is to disable the test on AArch64, but this may just be hiding the problem?

The test is remove D58396