Tue, 30 Jan 2018 20:32:48 -0800 lazymanifest: avoid reading uninitialized memory stable
Jun Wu <quark@fb.com> [Tue, 30 Jan 2018 20:32:48 -0800] rev 35810
lazymanifest: avoid reading uninitialized memory I got errors running tests with clang UBSAN [1] enabled. One of them is: ``` --- test-dirstate.t +++ test-dirstate.t.err @@ -85,9 +85,115 @@ $ echo "[extensions]" >> .hg/hgrc $ echo "dirstateex=../dirstateexception.py" >> .hg/hgrc $ hg up 0 - abort: simulated error while recording dirstateupdates - [255] + mercurial/cext/manifest.c:781:13: runtime error: load of value 190, which is not a valid value for type 'bool' + #0 0x7f668a8cf748 in lazymanifest_diff mercurial/cext/manifest.c:781 + #1 0x7f6692fc1dc4 in call_function Python-2.7.11/Python/ceval.c:4350 + ....... + SUMMARY: UndefinedBehaviorSanitizer: invalid-bool-load mercurial/cext/manifest.c:781:13 in + [1] $ hg log -r . -T '{rev}\n' 1 $ hg status - ? a ``` While the code is not technically wrong, but switching the condition would make clang UBSAN happy. So let's do it. The uninitialized memory could come from, for example, `lazymanifest_copy` allocates `self->maxlines` items but only writes the first `self->lines` items. [1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html Test Plan: Run `test-dirstate.t` with UBSAN and it no longer reports the issue. Differential Revision: https://phab.mercurial-scm.org/D1948
Fri, 26 Jan 2018 11:42:47 -0800 unamend: fix command summary line stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 26 Jan 2018 11:42:47 -0800] rev 35809
unamend: fix command summary line Before this patch, the docstring started with a newline, which led the summary line (shown in e.g. `hg help -c`) to be blank. Differential Revision: https://phab.mercurial-scm.org/D1943
Mon, 29 Jan 2018 13:30:29 -0800 configitems: traverse sections deterministically stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 29 Jan 2018 13:30:29 -0800] rev 35808
configitems: traverse sections deterministically Otherwise output can be non-deterministic if there are warnings for multiple sections. Differential Revision: https://phab.mercurial-scm.org/D1947
Mon, 29 Jan 2018 21:42:18 -0500 lfs: don't require the .hglfs file to be tracked to control the policy stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 29 Jan 2018 21:42:18 -0500] rev 35807
lfs: don't require the .hglfs file to be tracked to control the policy The .hgignore file doesn't need to be tracked, nor does the git equivalent of this file. I'm still a little concerned about the effects of forgetting to commit this file. But the fact that conversions maintain the hashes if only the normal vs external storage changes, should make this less risky.
Sat, 27 Jan 2018 21:50:04 -0500 tests: add a pattern to fix --pure tests stable
Augie Fackler <augie@google.com> [Sat, 27 Jan 2018 21:50:04 -0500] rev 35806
tests: add a pattern to fix --pure tests Test Plan: ran all tests with and without --pure, everything passed on gcc112. Differential Revision: https://phab.mercurial-scm.org/D1946
Fri, 26 Jan 2018 16:01:42 +0100 streamclone: add a comment about non-publishing being broken with v1 stable
Boris Feld <boris.feld@octobus.net> [Fri, 26 Jan 2018 16:01:42 +0100] rev 35805
streamclone: add a comment about non-publishing being broken with v1 This change was suggested by Gregory Szorc.
Fri, 26 Jan 2018 15:51:07 +0100 streamclone: move requirement update into consumev2 stable
Boris Feld <boris.feld@octobus.net> [Fri, 26 Jan 2018 15:51:07 +0100] rev 35804
streamclone: move requirement update into consumev2 This change was suggested by Gregory Szorc.
Wed, 24 Jan 2018 21:44:31 +0100 streamclone: use readexactly when reading stream v2 stable
Boris Feld <boris.feld@octobus.net> [Wed, 24 Jan 2018 21:44:31 +0100] rev 35803
streamclone: use readexactly when reading stream v2 Yuya Nishihara pointed out that it is safer.
Wed, 24 Jan 2018 21:37:48 +0100 streamclone: rename '_emit' to '_emit2' for clarity stable
Boris Feld <boris.feld@octobus.net> [Wed, 24 Jan 2018 21:37:48 +0100] rev 35802
streamclone: rename '_emit' to '_emit2' for clarity This change was suggested by Gregory Szorc.
Tue, 23 Jan 2018 21:14:36 +0900 help: do not suggest "update --clean ." to cancel uncommitted merge stable
Yuya Nishihara <yuya@tcha.org> [Tue, 23 Jan 2018 21:14:36 +0900] rev 35801
help: do not suggest "update --clean ." to cancel uncommitted merge Follows up 41ef02ba329b.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip