From: Thomas Gummerer <t.gummerer@gmail.com>
To: git@vger.kernel.org
Cc: Thomas Gummerer <t.gummerer@gmail.com>
Subject: [PATCH 0/3] fixes for running the test suite with --valgrind
Date: Tue, 3 Oct 2017 20:57:10 +0100 [thread overview]
Message-ID: <20171003195713.13395-1-t.gummerer@gmail.com> (raw)
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(-)
--
2.14.1.480.gb18f417b89
next reply other threads:[~2017-10-03 19:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 19:57 Thomas Gummerer [this message]
2017-10-03 19:57 ` [PATCH 1/3] path.c: fix uninitialized memory access Thomas Gummerer
2017-10-03 22:45 ` Jonathan Nieder
2017-10-03 23:30 ` Jeff King
2017-10-03 23:37 ` Jonathan Nieder
2017-10-04 4:47 ` Junio C Hamano
2017-10-04 5:21 ` Jeff King
2017-10-04 19:22 ` Thomas Gummerer
2017-10-04 19:36 ` Jonathan Nieder
2017-10-03 19:57 ` [PATCH 2/3] http-push: fix construction of hex value from path Thomas Gummerer
2017-10-03 22:53 ` Jonathan Nieder
2017-10-03 23:36 ` Jeff King
2017-10-04 4:48 ` Junio C Hamano
2017-10-04 5:20 ` Junio C Hamano
2017-10-04 5:26 ` Jeff King
2017-10-04 6:26 ` Junio C Hamano
2017-10-03 19:57 ` [PATCH 3/3] sub-process: allocate argv on the heap Thomas Gummerer
2017-10-03 20:24 ` Johannes Sixt
2017-10-04 4:59 ` Junio C Hamano
2017-10-04 5:32 ` Jeff King
2017-10-04 5:58 ` Johannes Sixt
2017-10-04 19:31 ` Thomas Gummerer
2017-10-03 20:25 ` Stefan Beller
2017-10-03 23:41 ` [PATCH 0/3] fixes for running the test suite with --valgrind Jeff King
2017-10-03 23:50 ` Jonathan Nieder
2017-10-03 23:54 ` Jeff King
2017-10-04 10:19 ` playing with MSan, was " Jeff King
2017-10-04 19:30 ` Thomas Gummerer
2017-10-05 3:46 ` lstat-ing delayed-filter output, was Re: playing with MSan Jeff King
2017-10-05 10:47 ` Lars Schneider
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171003195713.13395-1-t.gummerer@gmail.com \
--to=t.gummerer@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.