sapling/eden/integration/hg
Adam Simpkins 4bb5948640 fix an invalid memory access in the checkout code
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
2017-04-13 17:34:38 -07:00
..
lib add an assert_status() method to the hg integration tests 2017-03-31 18:21:44 -07:00
add_test.py tweak the hg integration test base class 2017-03-31 11:39:48 -07:00
README.md move integration tests to eden/integration 2017-01-31 14:41:14 -08:00
status_test.py tweak the hg integration test base class 2017-03-31 11:39:48 -07:00
TARGETS move integration tests to eden/integration 2017-01-31 14:41:14 -08:00
update_test.py fix an invalid memory access in the checkout code 2017-04-13 17:34:38 -07:00

Integration tests in this directory are specific to the Eden extension for Mercurial.

Most tests will want to subclass HgExtensionTestBase.