This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] properly initialize buckets in __kmp_dephash_extend
ClosedPublic

Authored by jschuchart on Jan 21 2021, 1:13 PM.

Details

Summary

The buckets are initialized in __kmp_dephash_create but when they are extended the memory is allocated but not NULL'd, potentially leaving some buckets uninitialized after all entries have been copied into the new allocation.

This commit makes sure the buckets are properly initialized with NULL before copying the entries.

Diff Detail

Event Timeline

jschuchart created this revision.Jan 21 2021, 1:13 PM
jschuchart requested review of this revision.Jan 21 2021, 1:13 PM
This revision is now accepted and ready to land.Jan 21 2021, 1:26 PM
protze.joachim accepted this revision.Jan 21 2021, 2:32 PM
protze.joachim added a subscriber: protze.joachim.

LGTM as well.

@AndreyChurbanov please push the patch, Joseph doesn't have commit rights. Thx!

This revision was landed with ongoing or failed builds.Jan 22 2021, 9:31 AM
This revision was automatically updated to reflect the committed changes.