This is an archive of the discontinued LLVM Phabricator instance.

Move lock acquire/release functions to safer locations in task deque cleanup code
ClosedPublic

Authored by hbae on Jul 28 2017, 1:57 PM.

Details

Summary

The original locations can be reached without initializing the lock variable (td_deque_lock), so it is potentially unsafe.
It is guaranteed that the lock is initialized if the deque (td_deque) is not NULL, and lock functions can be safely called.

Diff Detail

Repository
rL LLVM

Event Timeline

hbae created this revision.Jul 28 2017, 1:57 PM
This revision is now accepted and ready to land.Jul 28 2017, 2:13 PM
This revision was automatically updated to reflect the committed changes.