[PATCH] D28131: [libcxx] Fix PR31402: map::__find_equal_key has undefined behavior.

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 27 15:43:56 PST 2016

EricWF created this revision.
EricWF added reviewers: mclow.lists, vsk.
EricWF added a subscriber: cfe-commits.

This patch fixes llvm.org/PR31402 by replacing `map::__find_equal_key` with `__tree::__find_equal`, which has already addressed the same undefined behavior.

Unfortunately I haven't been able to write a test case which causes the UBSAN diagnostic mentioned in the bug report. I can write tests which exercise the UB but for some reason they do not cause UBSAN to fail. Any help writing a test case would be appreciated.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28131.82564.patch
Type: text/x-patch
Size: 6721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161227/aae18819/attachment.bin>

More information about the cfe-commits mailing list