Page MenuHomePhabricator

[flang] Fix race condition in runtime
ClosedPublic

Authored by klausler on May 5 2021, 11:28 AM.

Details

Summary

The code that initializes the default units 5 & 6 had
a race condition that would allow threads access to the
unit map before it had been populated.

Also add some missing calls to va_end() that will never
be called (they're in program abort situations) but might
elicit warnings if absent.

Diff Detail

Event Timeline

klausler created this revision.May 5 2021, 11:28 AM
klausler requested review of this revision.May 5 2021, 11:28 AM

There is a bug report which probably mentions the same issue that is addressed here. Adding the reporter to the review list.
https://bugs.llvm.org/show_bug.cgi?id=48987

jeanPerier accepted this revision.May 6 2021, 1:23 AM

The fix looks in line with the issue reported by @rogfer01 and what he suggested.

This revision is now accepted and ready to land.May 6 2021, 1:23 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2021, 11:14 AM