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

2017-01-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/__tree:1400 __parent_pointer& __parent, const key_type& __v); +// FIXME: Make this function const qualified. Unfortunetly doing so +// breaks existing code which uses non-const callable

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

2017-01-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a reviewer: EricWF. EricWF added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D28131#632516, @vsk wrote: > LGTM. I'm not sure what to do for a test. Have you tried checking the IR for > the affected object

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

2016-12-29 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. LGTM. I'm not sure what to do for a test. Have you tried checking the IR for the affected object file in tablegen at '-O2 -fsanitize=undefined'? If there's an unconditional call to the ubsan handler, maybe the tablegen source could be used to find a small reproducer?

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

2016-12-27 Thread Eric Fiselier via Phabricator via cfe-commits
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