Page MenuHomePhabricator

Fix for D25504 - segfault because of double free()-ing in task deps shutdown code.
ClosedPublic

Authored by jlpeyton on Nov 18 2016, 9:04 AM.

Diff Detail

Event Timeline

jlpeyton updated this revision to Diff 78538.Nov 18 2016, 9:04 AM
jlpeyton retitled this revision from to Fix for D25504 - segfault because of double free()-ing in task deps shutdown code..
jlpeyton updated this object.
jlpeyton added reviewers: pawosm01, AndreyChurbanov.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added a subscriber: openmp-commits.
pawosm01 accepted this revision.Nov 19 2016, 2:22 PM
pawosm01 edited edge metadata.

I tested this change for few hours running superlu_taskdep and strassen_taskdep on different number of cores. Didn't fail, so we can assume it solves the problem.

BTW, don't you think that the task->td_dephash pointer should be NULLified after calling __kmp_dephash_free() on it in kmp_taskdeps.cpp line 380?

This revision is now accepted and ready to land.Nov 19 2016, 2:22 PM
AndreyChurbanov accepted this revision.Nov 21 2016, 8:22 AM
AndreyChurbanov edited edge metadata.

BTW, don't you think that the task->td_dephash pointer should be NULLified after calling __kmp_dephash_free() on it in kmp_taskdeps.cpp line 380?

I agree. Keeping stale pointer is not good generally, regardless that it is not used. So, writing NULL should be safer. Of cause this cleanup can be done via a separate review.

This revision was automatically updated to reflect the committed changes.

Committed setting task->td_dephash = NULL without review: r287552