Todd Lipcon has posted comments on this change. Change subject: Don't take a reference to a temporary when comparing first and last encoded keys ......................................................................
Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/2271/1//COMMIT_MSG Commit Message: Line 16: likely to happen in mac osx for some reason that is not completely obvious. per our offline chat, I think the reason is that OSX uses libc++, and libc++ uses a non-reference-counted string. With a ref-counted string, what we're doing is safe: the map holds onto the 'string', and even though we return a 'copy', it points to the same storage. Then we construct our Slice pointing at that storage, which stays around because the string isn't modified. In libc++, returning the std::string copy is actually a new copy of the underlying data, so our Slice points to a temporary bit of memory. Should update the commit message to add the explanation. -- To view, visit http://gerrit.cloudera.org:8080/2271 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa1cbb087c6467bb5da777234270df089a4b3252 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Jean-Daniel Cryans Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
