mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
4bb5948640
Summary: Fix a subtle crash during checkout when handling newly added entries that already exist in the working directory: CheckoutAction passed the entry name to checkoutUpdateEntry() as a PathComponentPiece. However, this PathComponentPiece could refer to the entry name owned by newScmEntry_, and it also passed newScmEntry_ into checkoutUpdateEntry() as an rvalue reference. As a result, if the string data was stored invalidated by the move the name would no longer be valid when checkoutUpdateEntry() tried to use it. This bug is triggered by doing an "hg update --clean", where a file added in the destination commit already exists on disk, and has an entry name of 23 characters or less. (The 23 character limit is fbstring's upper bound on small string optimizations, where it will store the string data inline in the object, causing it to be invalidated on move.) This also fixes a crash in a VLOG() statement when the verbose log level for TreeInode.cpp was set to 4 or greater. Reviewed By: bolinfest Differential Revision: D4882544 fbshipit-source-id: 917ede6eeae2224aaa0724b8b30324f3c3a5c924 |
||
---|---|---|
.. | ||
lib | ||
add_test.py | ||
README.md | ||
status_test.py | ||
TARGETS | ||
update_test.py |
Integration tests in this directory are specific to the Eden extension for Mercurial.
Most tests will want to subclass HgExtensionTestBase
.