From: Brandon Williams <bmwill@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Stefan Beller" <sbeller@google.com>, "Jeff King" <peff@peff.net>,
"git@vger.kernel.org" <git@vger.kernel.org>,
"René Scharfe" <l.s.r@web.de>
Subject: Re: Fwd: New Defects reported by Coverity Scan for git
Date: Tue, 18 Jul 2017 11:00:57 -0700 [thread overview]
Message-ID: <20170718180057.GA22656@google.com> (raw)
In-Reply-To: <xmqqy3rleijv.fsf@gitster.mtv.corp.google.com>
On 07/18, Junio C Hamano wrote:
> Stefan Beller <sbeller@google.com> writes:
>
> >> I'd be more worried about segfault we seem to be getting only on
> >> Windows from this:
> >>
> >> git -C parent grep -e "(1|2)d(3|4)" --recurse-submodules HEAD^ > actual
> >>
> >> in https://travis-ci.org/git/git/jobs/254654195 by the way.
> >
> > Thanks for bringing that to my attention, (I do not follow the travis builds
> > as closely, as there is no yelling email in my inbox).
> >
> > Windows builds on travis seem to be flaky.
> > (sometimes they do not start), but there are also
> > successful builds, including the -rc0, which may indicate
> > bw/grep-recurse-submodules may be faulty on Windows.
>
> I can get valgrind complaints locally from
>
> $ cd t && sh t7814-grep*.sh --valgrind -i -v
>
> so this may not be Windows only. Can repo_worktree_path() return a NULL
> in repo_read_gitmodules() to cause git_config_from_file() barf on a NULL
> gitmodule_path?
Yep that's most likely the cause. The issue is if a repository doesn't
have a worktree then what should a worktree path look like?
repo_read_gitmodules() should check if there is a worktree before trying
to load the gitmodules file. I actually noticed this and have it fixed locally in
another series I'm working on right now. Looks like I may have to get
that change in first though. Thanks for finding this.
>
> ==20383== Syscall param open(filename) points to unaddressable byte(s)
> ==20383== at 0x5153140: __open_nocancel (/build/eglibc-SvCtMH/eglibc-2.19/io/../sysdeps/unix/syscall-template.S:81)
> ==20383== by 0x50DDED7: _IO_file_fopen@@GLIBC_2.2.5 (/build/eglibc-SvCtMH/eglibc-2.19/libio/fileops.c:228)
> ==20383== by 0x50D23D3: __fopen_internal (/build/eglibc-SvCtMH/eglibc-2.19/libio/iofopen.c:90)
> ==20383== by 0x569107: git_fopen (/home/gitster/git.git/compat/fopen.c:22)
> ==20383== by 0x55B1ED: fopen_or_warn (/home/gitster/git.git/wrapper.c:439)
> ==20383== by 0x4A2A32: git_config_from_file (/home/gitster/git.git/config.c:1442)
> ==20383== by 0x540317: repo_read_gitmodules (/home/gitster/git.git/submodule.c:269)
> ==20383== by 0x434389: grep_submodule (/home/gitster/git.git/builtin/grep.c:422)
> ==20383== by 0x4348C8: grep_tree (/home/gitster/git.git/builtin/grep.c:580)
> ==20383== by 0x434867: grep_tree (/home/gitster/git.git/builtin/grep.c:576)
> ==20383== by 0x436034: cmd_grep (/home/gitster/git.git/builtin/grep.c:622)
> ==20383== by 0x4063DC: handle_builtin (/home/gitster/git.git/git.c:330)
> ==20383== Address 0x0 is not stack'd, malloc'd or (recently) free'd
>
>
--
Brandon Williams
next prev parent reply other threads:[~2017-07-18 18:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <596ddaa620821_77f83e7330107c4@ss1435.mail>
2017-07-18 16:59 ` Fwd: New Defects reported by Coverity Scan for git Stefan Beller
2017-07-18 17:23 ` Junio C Hamano
2017-07-18 17:41 ` Stefan Beller
2017-07-18 17:55 ` Junio C Hamano
2017-07-18 18:00 ` Brandon Williams [this message]
2017-07-18 18:06 ` Stefan Beller
2017-07-20 20:32 ` René Scharfe
2017-07-20 21:52 ` Junio C Hamano
2018-03-26 23:39 Stefan Beller
2018-03-27 10:38 ` Jeff Hostetler
[not found] <580893d5a4736_4ed37b53181837@ss1435.mail>
2016-10-20 17:05 ` Stefan Beller
2016-10-20 17:50 ` Junio C Hamano
2016-10-20 17:58 ` Stefan Beller
2016-10-20 18:05 ` Junio C Hamano
2016-10-20 18:13 ` Stefan Beller
2016-10-20 21:42 ` Jeff King
2016-10-20 22:07 ` Junio C Hamano
2016-10-20 21:40 ` Jeff King
[not found] <55bb53d17f78c_2d71521318537c@scan.mail>
2015-07-31 11:24 ` Duy Nguyen
[not found] <558151df465a5_4fafe3b3182568a@scan.mail>
2015-06-17 13:54 ` Duy Nguyen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170718180057.GA22656@google.com \
--to=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=peff@peff.net \
--cc=sbeller@google.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).