On 09/27, Ruud van Asseldonk wrote:
> Hi,
> 
> I just ran into a segmentation fault during a rebase with rerere
> enabled. Inspecting the core dump with gdb shows:

Thanks for reporting this bug

> (gdb) bt
> #0  0x000055d673375ce0 in do_rerere_one_path (update=0x7fff03c37f30,
> rr_item=0x55d6746d0b30) at rerere.c:755
> #1  do_plain_rerere (fd=3, rr=0x7fff03c37ef0) at rerere.c:853
> #2  rerere (flags=flags@entry=0) at rerere.c:918
> #3  0x000055d673246b01 in am_resolve (state=0x7fff03c38120) at 
> builtin/am.c:1901
> #4  cmd_am (argc=<optimised out>, argv=<optimised out>,
> prefix=<optimised out>) at builtin/am.c:2394
> #5  0x000055d67323f975 in run_builtin (argv=<optimised out>,
> argc=<optimised out>, p=<optimised out>) at git.c:346
> #6  handle_builtin (argc=<optimised out>, argv=<optimised out>) at git.c:554
> #7  0x000055d6732405e5 in run_argv (argv=0x7fff03c394a0,
> argcp=0x7fff03c394ac) at git.c:606
> #8  cmd_main (argc=<optimised out>, argv=<optimised out>) at git.c:683
> #9  0x000055d67323f64a in main (argc=4, argv=0x7fff03c396f8) at 
> common-main.c:43
> (gdb) info locals
> path = 0x55d6746d08e0 "<file path redacted>"
> id = 0x55d6746d01e0
> rr_dir = 0x55d6746ccb80
> variant = <optimised out>
> path = <optimised out>
> id = <optimised out>
> rr_dir = <optimised out>
> variant = <optimised out>
> both = <optimised out>
> vid = <optimised out>
> path = <optimised out>
> (gdb) print id
> $1 = (struct rerere_id *) 0x55d6746d01e0
> (gdb) print id->collection
> $2 = (struct rerere_dir *) 0x55d6746ccb80
> (gdb) print id->collection->status
> $3 = (unsigned char *) 0x0
> 
> This is using Git 2.17.1 from the 1:2.17.1-1ubuntu0.1 Ubuntu package.
> Looking at the diff between v2.17.1 and master for rerere.c it looks
> like the part of the rerere.c where the null pointer dereference
> happens has not been touched, so the issue might still be there.
> Unfortunately I was unable to reproduce the bug; after removing
> .git/MERGE_RR.lock and restarting the rebase, it completed fine.

I do believe this bug may actually be fixed in master, by 93406a282f
("rerere: fix crash with files rerere can't handle", 2018-08-05).  Do
you by any chance remember if you committed a file that contained
conflict markers during the rebase at some point?

The problem I found at the time looked the same as your backtrace
above in any case.

Would have been nice if you were able to reproduce it, just to make
sure it's not something else we're seeing here.

> Please let me know if there is anything I can do to help diagnose the
> problem, or whether I should report the bug to Ubuntu instead.
> 
> Kind regards,
> 
> Ruud van Asseldonk

Reply via email to