fixes for running the test suite with --valgrind
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 26 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | path.c: fix uninitialized memory accesspath.c | +10 | 7 replies | |
| 2/3 | http-push: fix construction of hex value from pathhttp-push.c | +1 | 6 replies | |
| 3/3 | sub-process: allocate argv on the heapsub-process.c | +3 | 6 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Jonathan Nieder |
|---|---|
| 1/3 | R-b R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] fixes for running the test suite with --valgrind
I recently tried to run the git test suite with --valgrind. Unfortunately it didn't come back completely clean. This patch series fixes a bunch of these errors, although unfortunately not quite all of them yet.
The remaining failures are in
t0021.15 - This one is not actually valgrind complaining about something, but the clean/smudge script not writing debug.log for some reason. I'm not quite sure what exactly is going on here. t0021.25, t0021.26 - This is an actual uninitialized memory usage:
==4751== Conditional jump or move depends on uninitialised value(s)
==4751== at 0x2796D5: fill_stat_cache_info (read-cache.c:153) ==4751== by 0x2218A2: write_entry (entry.c:359) ==4751== by 0x221D42: checkout_entry (entry.c:458) ==4751== by 0x2EB627: check_updates (unpack-trees.c:382) ==4751== by 0x2EDBA1: unpack_trees (unpack-trees.c:1380) ==4751== by 0x13797E: checkout (clone.c:750) ==4751== by 0x138FF4: cmd_clone (clone.c:1194) ==4751== by 0x11A6F2: run_builtin (git.c:342) ==4751== by 0x11A9E8: handle_builtin (git.c:550) ==4751== by 0x11ABCC: run_argv (git.c:602) ==4751== by 0x11AD8E: cmd_main (git.c:679) ==4751== by 0x1BF125: main (common-main.c:43)
==4751== Uninitialised value was created by a stack allocation
==4751== at 0x2212B4: write_entry (entry.c:254)
==4751==
So far I've tracked this one down to the lstat call in write_entry failing, and thus not filling struct stat_info. I'm not quite sure yet about the best workaround for that (and I'm not very familiar with the clean/smudge code). I'll keep digging what the problem there is.
There's also one test that's unexpectedly passing when the test suite is run under valgrind (t6410.) but I haven't dug into what's up with that yet.
These patches could be applied by themselves as well, but since they work toward the same goal, and a cover letter would explain where these are coming from I decided to make them into a patch series.
Thomas Gummerer (3):
path.c: fix uninitialized memory access
http-push: fix construction of hex value from path
sub-process: allocate argv on the heap
http-push.c | 2 +- path.c | 19 ++++++++++--------- sub-process.c | 4 +++- 3 files changed, 14 insertions(+), 11 deletions(-)
Signature · 1 line
2.14.1.480.gb18f417b89