forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault running git stash
with git add -N
file
#2006
Milestone
Comments
kraai
added a commit
to kraai/git
that referenced
this issue
Jan 4, 2019
If reset_tree returns a non-zero value, stash_working_tree calls object_array_clear with &rev.pending before rev is initialized. This causes a segmentation fault. Prevent this by initializing rev before calling reset_tree. This fixes git-for-windows#2006. Signed-off-by: Matthew Kraai <mkraai@its.jnj.com>
dscho
added a commit
to git-for-windows/build-extra
that referenced
this issue
Jan 9, 2019
`git stash` [now works](git-for-windows/git#2006) after staging files with `git add -N`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
pushed a commit
to dscho/git
that referenced
this issue
Jan 18, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. Detailed explanation: If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes git-for-windows#2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
gitster
pushed a commit
to gitster/git
that referenced
this issue
Jan 18, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes git-for-windows#2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
to dscho/git
that referenced
this issue
Feb 7, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes git-for-windows#2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
to dscho/git
that referenced
this issue
Feb 7, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes git-for-windows#2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
that referenced
this issue
Feb 12, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Feb 12, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
to dscho/git
that referenced
this issue
Feb 14, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes git-for-windows#2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
that referenced
this issue
Feb 14, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
that referenced
this issue
Feb 14, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
to dscho/git
that referenced
this issue
Feb 19, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes git-for-windows#2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
to dscho/git
that referenced
this issue
Feb 24, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes git-for-windows#2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Feb 28, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Feb 28, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
that referenced
this issue
Feb 28, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Mar 5, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Mar 5, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Mar 7, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Mar 7, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci
pushed a commit
that referenced
this issue
Mar 7, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
that referenced
this issue
Mar 11, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
dscho
pushed a commit
that referenced
this issue
Mar 11, 2019
After `git add -N <file>`, the index is in a special state. A state for which the built-in stash was not prepared, as it failed to initialize the `rev` structure in that case before using `&rev.pending`. If `reset_tree()` returns a non-zero value, `stash_working_tree()` calls `object_array_clear()` with `&rev.pending`. If `rev` is not initialized, this causes a segmentation fault. Prevent this by initializing `rev` before calling `reset_tree()`. This fixes #2006. [jes: modified the commit message in preparation for sending this patch to the Git mailing list.] Signed-off-by: Matthew Kraai <mkraai@its.jnj.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup
defaults?
to the issue you're seeing?
Not that I can think of.
Details
Git Bash.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
I expected Git to stash the changes to
bar
.Git produced the following output:
It also left behind
.git/lock
, so runninggit stash
again produces the following output:URL to that repository to help us with testing?
It doesn't occur with a specific repository.
The text was updated successfully, but these errors were encountered: