Commit 98bfb51
authored
diff: avoid segfault with freed entries (#835)
This is also going upstream as part of gitgitgadget#2027.
However, I found out about this segfault due to a reproducible error
happening in the 1JS monorepo's PR build pipelines. After trying to
uncover a repro by adding tracing to my own fork and using that version
within the pipeline, I was finally able to get a reproducer in a 1JS
Codespace. Debugging with a locally-build version of Git helped me find
the situation to fix this.
1JS has a workaround for this issue by running `git status` before the
necessary build step that runs the `git diff` command. That refresh of
the index prevents the freed diff queue items, preventing the issue.
This reduces the urgency somewhat, but I also don't know where else this
could be impacting users.
* [X] This is an early version of work already under review upstream.
I'm recommending this version on top of the `vfs-2.52.0` branch so we
can get this fixed more quickly for an upcoming release of
microsoft/git.2 files changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7053 | 7053 | | |
7054 | 7054 | | |
7055 | 7055 | | |
| 7056 | + | |
7056 | 7057 | | |
7057 | 7058 | | |
7058 | 7059 | | |
| |||
7096 | 7097 | | |
7097 | 7098 | | |
7098 | 7099 | | |
| 7100 | + | |
| 7101 | + | |
| 7102 | + | |
| 7103 | + | |
7099 | 7104 | | |
7100 | 7105 | | |
7101 | 7106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
135 | 170 | | |
136 | 171 | | |
137 | 172 | | |
| |||
0 commit comments