Repository navigation
Commit 668dc5c
committed
fix(watcher): never hand qsort a NULL array in the SVN observation core
A status document with no content candidates (only clean entries,
externals or property changes) left the candidate array NULL, and
fingerprint_candidates sorted it anyway. glibc declares qsort's base
nonnull even for a zero count, so the trapping UBSan leg aborts there;
macOS and recovering UBSan only print or ignore it. Sort only when there
are at least two candidates.
parse_clean_props_and_externals_are_not_local_changes reaches this path:
RED on the Linux arm64 GCC leg built with -fno-sanitize-recover=undefined
before the guard, GREEN after.
Refs #1127
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 0a5b30b commit 668dc5c
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1173 | 1173 | | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | | - | |
1177 | | - | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
1178 | 1182 | | |
1179 | 1183 | | |
1180 | 1184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| |||
0 commit comments