public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Bernhard Posselt <mail@bernhard-posselt•com>
To: Jeff King <peff@peff•net>
Cc: git@vger•kernel.org
Subject: Re: Memory corruption when rebasing with git version 1.8.1.5 on arch
Date: Tue, 19 Mar 2013 11:42:45 +0100	[thread overview]
Message-ID: <51484125.9000307@bernhard-posselt.com> (raw)
In-Reply-To: <20130311051840.GB13510@sigill.intra.peff.net>

Ok, sorrry for not responsding for quite a while, we had the 5.0 release and had too much to do.

I found out why it segfaults: I had a .gitconfig file (sry must have somehow missed that no idea why actually) with the following contents:

http://dpaste.com/1027662/

it seems that the memory corruption does not happen anymore when i change

[apply]
         whitespace = fix

to

[apply]
         #whitespace = fix


so fixing whitespaces may be the culprit

On 03/11/2013 06:18 AM, Jeff King wrote:
> On Sun, Mar 10, 2013 at 12:45:43PM +0100, Bernhard Posselt wrote:
>
>>>    valgrind -q --trace-children=yes --log-file=/tmp/valgrind.out \
>>>      git pull --rebase https://github.com/Raydiation/core
>> The log file was empty and it seemed to apply everything nice when
>> running valgrind. When i tried to run it without valgrind it failed
>> with memory corruption.
> Thanks, we are maybe getting closer. It's weird that it works OK with
> valgrind. If the valgrind log is empty, though, I'm confused about where
> the output you pasted below came from.
>
>> ==22291== Invalid write of size 1
>> ==22291==    at 0x4C2DB93: memcpy@@GLIBC_2.14 (in
>> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>> ==22291==    by 0x4076B1: update_pre_post_images (in /usr/lib/git-core/git)
>> ==22291==    by 0x40A60F: apply_fragments (in /usr/lib/git-core/git)
>> ==22291==    by 0x40C29F: check_patch_list (in /usr/lib/git-core/git)
>> ==22291==    by 0x40CC35: apply_patch (in /usr/lib/git-core/git)
>> ==22291==    by 0x40F584: cmd_apply (in /usr/lib/git-core/git)
>> ==22291==    by 0x4058E7: handle_internal_command (in /usr/lib/git-core/git)
>> ==22291==    by 0x404DD1: main (in /usr/lib/git-core/git)
> Hmm, it would be nice to have line numbers. Can you try compiling with
> "-g -O0"?
>
> The function where the problem is deals with whitespace munging. Just a
> guess, but do you have any whitespace config options set (e.g.,
> apply.whitespace)?
>
> -Peff

  reply	other threads:[~2013-03-19 10:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 12:19 Memory corruption when rebasing with git version 1.8.1.5 on arch Bernhard Posselt
2013-03-08 21:28 ` Jeff King
2013-03-09  0:08   ` Bernhard Posselt
2013-03-09  4:48     ` Jeff King
2013-03-09 10:54       ` Bernhard Posselt
2013-03-10  7:05         ` Jeff King
2013-03-10 11:04           ` Bernhard Posselt
2013-03-10 11:45           ` Bernhard Posselt
2013-03-11  5:18             ` Jeff King
2013-03-19 10:42               ` Bernhard Posselt [this message]
2013-03-19 13:44                 ` Jeff King
2013-03-19 16:02                   ` Junio C Hamano
2013-03-22 18:08                     ` Junio C Hamano
2013-03-22 21:24                       ` 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=51484125.9000307@bernhard-posselt.com \
    --to=mail@bernhard-posselt$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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