From: Thomas Haller <thom311@gmail.com>
To: Git List <git@vger.kernel.org>
Subject: segfault for git log --graph --no-walk --grep a
Date: Sat, 9 Feb 2013 00:52:16 +0100 [thread overview]
Message-ID: <201302090052.22053.thom311@gmail.com> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 2062 bytes --]
Hallo,
I just found that git crashes with a segmentation fault when calling
$ git log --graph --no-walk --grep pattern
It happens both for version 1.7.10.4 from Debian (wheezy,amd64) and
a fresh compiled git from github (git.git repository, master).
For the error to occure, the pattern must match the commit message in HEAD.
How to reproduce:
git init .
git commit -m 'text1' --allow-empty
git commit -m 'text2' --allow-empty
git log --graph --no-walk --grep 'text2'
And here is coredump I got:
Core was generated by `git log --graph --no-walk --grep text2'.
Program terminated with signal 11, Segmentation fault.
#0 __strlen_sse42 () at ../sysdeps/x86_64/multiarch/strlen-sse4.S:32
#1 0x00000000004cc13e in commit_match (opt=0x7fffbd0ee500, commit=0x216d1a8) at revision.c:2306
#2 get_commit_action (revs=0x7fffbd0ee500, commit=0x216d1a8) at revision.c:2338
#3 0x00000000004984b4 in graph_is_interesting (commit=<optimized out>, graph=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at graph.c:330
#4 0x0000000000498569 in first_interesting_parent (graph=graph@entry=0x21629c0) at graph.c:369
#5 0x000000000049965e in graph_update (graph=0x21629c0, commit=<optimized out>) at graph.c:593
#6 0x00000000004cc7a9 in get_revision (revs=revs@entry=0x7fffbd0ee500) at revision.c:2580
#7 0x000000000043988a in cmd_log_walk (rev=rev@entry=0x7fffbd0ee500) at builtin/log.c:309
#8 0x000000000043a398 in cmd_log (argc=9, argv=0x2162930, prefix=0x0) at builtin/log.c:582
#9 0x0000000000405988 in run_builtin (argv=0x2162930, argc=9, p=0x751438) at git.c:281
#10 handle_internal_command (argc=9, argv=0x2162930) at git.c:443
#11 0x0000000000404df2 in run_argv (argv=0x7fffbd0eec00, argcp=0x7fffbd0eec0c) at git.c:489
#12 main (argc=9, argv=0x2162930) at git.c:564
it happens in file revision.c:2306 because "commit->buffer" is zero:
retval = grep_buffer(&opt->grep_filter,
commit->buffer, strlen(commit->buffer));
thank you all, for this awesome software.
Thomas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next reply other threads:[~2013-02-08 23:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 23:52 Thomas Haller [this message]
2013-02-09 0:05 ` segfault for git log --graph --no-walk --grep a Junio C Hamano
2013-02-09 0:22 ` Junio C Hamano
2013-02-09 0:27 ` Jeff King
2013-02-09 0:39 ` Junio C Hamano
2013-02-09 0:47 ` Junio C Hamano
2013-02-09 1:05 ` Jeff King
2013-02-09 1:08 ` Jeff King
2013-02-11 19:16 ` Jeff King
2013-02-11 20:01 ` Junio C Hamano
2013-02-11 20:36 ` Junio C Hamano
2013-02-11 20:41 ` Jeff King
2013-02-11 20:55 ` Junio C Hamano
2013-02-11 20:59 ` [PATCH] log: re-encode commit messages before grepping Jeff King
2013-02-11 21:11 ` Junio C Hamano
2013-02-11 21:14 ` Jeff King
2013-02-25 8:37 ` [PATCH ] t4210-log-i18n: spell encoding name "UTF-8" correctly Johannes Sixt
2013-02-25 15:19 ` Jeff King
2013-02-25 19:06 ` Junio C Hamano
2013-02-25 20:31 ` Jeff King
2013-02-26 6:47 ` Johannes Sixt
2013-02-25 21:00 ` Torsten Bögershausen
2013-02-25 18:54 ` Torsten Bögershausen
2013-02-25 20:36 ` Jeff King
2013-02-09 0:29 ` segfault for git log --graph --no-walk --grep a Junio C Hamano
2013-02-09 0:39 ` Jeff King
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=201302090052.22053.thom311@gmail.com \
--to=thom311@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 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 NNTP newsgroup(s).