Skip to content

status: fix crash in git status --deserialize --verbose (based on v2.26)#260

Merged
jeffhostetler merged 3 commits intomicrosoft:vfs-2.26.0from
jeffhostetler:msft-verbose-status-deserialize-v226
Apr 13, 2020
Merged

status: fix crash in git status --deserialize --verbose (based on v2.26)#260
jeffhostetler merged 3 commits intomicrosoft:vfs-2.26.0from
jeffhostetler:msft-verbose-status-deserialize-v226

Conversation

@jeffhostetler
Copy link

Fix crash in git status -v when using the serialization cache.

This PR replaces #258 and is based upon v2.26, rather than v2.25 where it was originally reported.

Fix crash in `git status -v` by setting `des_s->repo`
to a non-null value.

Upstream changes to eliminate use of `the_repository`
added a `repo` field to `struct status`.  And calls in
`wt-status.c` to `repo_init_revisions()` were changed
to pass `s->repo` rather than `the_repository`.

The status deserialization code was not updated to
actually set `s->repo` before common code passed the
value to OID routines.

This caused a segfault when verbose output was requested.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Disable deserialization when verbose output requested.

Verbose mode causes Git to print diffs for modified files.
This requires the index to be loaded to have the currently
staged OID values.  Without loading the index, verbose output
make it look like everything was deleted.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Verify that `git status --deserialize=x -v` does not crash and
generates the same output as a normal (scanning) status command.

These issues are described in the previous 2 commits.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Copy link
Member

@kewillford kewillford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

derrickstolee added a commit to derrickstolee/VFSForGit that referenced this pull request Apr 13, 2020
See microsoft/git#260 for details.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Copy link

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests in microsoft/VFSForGit#1650 have passed except for a notoriously slow version. This is good to go.

@jeffhostetler jeffhostetler merged commit f5992bb into microsoft:vfs-2.26.0 Apr 13, 2020
dscho pushed a commit that referenced this pull request May 20, 2020
…alize-v226

status: fix crash in `git status --deserialize --verbose` (based on v2.26)
dscho pushed a commit that referenced this pull request May 20, 2020
…alize-v226

status: fix crash in `git status --deserialize --verbose` (based on v2.26)
derrickstolee pushed a commit that referenced this pull request Jun 1, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Jul 20, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Jul 27, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Jul 28, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Oct 6, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Oct 6, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request Oct 6, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Oct 9, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Oct 9, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Oct 16, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Oct 19, 2020
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request Mar 8, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
jeffhostetler pushed a commit that referenced this pull request Mar 15, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
jeffhostetler pushed a commit that referenced this pull request Mar 16, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request May 17, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request May 17, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request May 17, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request May 21, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request May 22, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request May 28, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request Jun 2, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request Jun 7, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Aug 3, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Aug 3, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request Aug 5, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Aug 9, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Aug 12, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Aug 17, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request Oct 30, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Oct 30, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Nov 4, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Nov 10, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee pushed a commit that referenced this pull request Nov 15, 2021
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 12, 2022
Includes these pull requests:

	microsoft#1
	microsoft#6
	microsoft#10
	microsoft#11
	microsoft#157
	microsoft#212
	microsoft#260
	microsoft#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 19, 2022
Includes these pull requests:

	microsoft#1
	microsoft#6
	microsoft#10
	microsoft#11
	microsoft#157
	microsoft#212
	microsoft#260
	microsoft#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
Includes these pull requests:

	microsoft#1
	microsoft#6
	microsoft#10
	microsoft#11
	microsoft#157
	microsoft#212
	microsoft#260
	microsoft#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
Includes these pull requests:

	microsoft#1
	microsoft#6
	microsoft#10
	microsoft#11
	microsoft#157
	microsoft#212
	microsoft#260
	microsoft#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
Includes these pull requests:

	microsoft#1
	microsoft#6
	microsoft#10
	microsoft#11
	microsoft#157
	microsoft#212
	microsoft#260
	microsoft#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
Includes these pull requests:

	microsoft#1
	microsoft#6
	microsoft#10
	microsoft#11
	microsoft#157
	microsoft#212
	microsoft#260
	microsoft#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 25, 2022
Includes these pull requests:

	microsoft#1
	microsoft#6
	microsoft#10
	microsoft#11
	microsoft#157
	microsoft#212
	microsoft#260
	microsoft#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho added a commit that referenced this pull request Feb 1, 2022
Includes these pull requests:

	#1
	#6
	#10
	#11
	#157
	#212
	#260
	#270

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants