"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Sebastien Marie <semarie@online.fr>
Subject:
got backout: segfault
To:
gameoftrees@openbsd.org
Date:
Fri, 7 Feb 2020 18:11:27 +0100

Download raw body.

Thread
Hi,

I just found a reproductible segfault while using 'got backout'.

$ git clone --bare https://github.com/semarie/rust-ports
$ got checkout rust-ports.git
$ cd rust-ports
$ got update -c 67c4a2936aa4a85b7ddc4ee009241b69e7cfda4f
$ got backout d4a757173ee4fb1762b1dd373f1d508175846c8f
G  Makefile
G  distinfo
Segmentation fault (core dumped)


Using gdb, I have the following backtrace (against got master ef2c200c):

Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000091f18e984bf in update_progress (arg=0x7f7ffffc86b8, status=33 '!', path=0x0) at /home/semarie/repos/openbsd/got/got/got.c:1174
1174            while (path[0] == '/')
(gdb) bt
#0  0x0000091f18e984bf in update_progress (arg=0x7f7ffffc86b8, status=33 '!', path=0x0) at /home/semarie/repos/openbsd/got/got/got.c:1174
#1  0x0000091f18edb3af in merge_file_cb (arg=0x7f7ffffc84f0, blob1=0x92195735ec0, blob2=0x0, id1=0x9212a0208c8, id2=0x0, path1=0x9211a813680 "patches/patch-src_librustc_target_spec_i586_unknown_openbsd_rs", path2=0x0, mode1=33184, mode2=0, repo=0x92172cc9800) at /home/semarie/repos/openbsd/got/got/../lib/worktree.c:2112
#2  0x0000091f18ea5ff2 in diff_deleted_blob (id=0x9212a0208c8, label=0x9211a813680 "patches/patch-src_librustc_target_spec_i586_unknown_openbsd_rs", mode=33184, repo=0x92172cc9800, cb=0x91f18edb080 <merge_file_cb>, cb_arg=0x7f7ffffc84f0) at /home/semarie/repos/openbsd/got/got/../lib/diff.c:385
#3  0x0000091f18ea502b in diff_entry_old_new (te1=0x9212a0207c4, te2=0x0, label1=0x9211a813680 "patches/patch-src_librustc_target_spec_i586_unknown_openbsd_rs", label2=0x921f4d7e780
"patches/patch-src_librustc_target_spec_i686_unknown_openbsd_rs", repo=0x92172cc9800, cb=0x91f18edb080 <merge_file_cb>, cb_arg=0x7f7ffffc84f0, diff_content=1) at /home/semarie/repos/openbsd/got/got/../lib/diff.c:536
#4  0x0000091f18ea4b6b in got_diff_tree (tree1=0x9214797ef80, tree2=0x92193a063e0, label1=0x9220371bd80 "patches", label2=0x921f4d7e180 "patches", repo=0x92172cc9800, cb=0x91f18edb080 <merge_file_cb>, cb_arg=0x7f7ffffc84f0, diff_content=1) at /home/semarie/repos/openbsd/got/got/../lib/diff.c:634
#5  0x0000091f18ea61ae in diff_modified_tree (id1=0x9213fa26d74, id2=0x92172cc9574, label1=0x9220371bd80 "patches", label2=0x921f4d7e180 "patches", repo=0x92172cc9800, cb=0x91f18edb080 <merge_file_cb>, cb_arg=0x7f7ffffc84f0, diff_content=1) at /home/semarie/repos/openbsd/got/got/../lib/diff.c:462
#6  0x0000091f18ea5183 in diff_entry_old_new (te1=0x9213fa26c70, te2=0x92172cc9470, label1=0x9220371bd80 "patches", label2=0x921f4d7e180 "patches", repo=0x92172cc9800, cb=0x91f18edb080 <merge_file_cb>, cb_arg=0x7f7ffffc84f0, diff_content=1) at /home/semarie/repos/openbsd/got/got/../lib/diff.c:549
#7  0x0000091f18ea4b6b in got_diff_tree (tree1=0x921eca3bc60, tree2=0x921a334c780, label1=0x91f18e8209f "", label2=0x91f18e8209f "", repo=0x92172cc9800, cb=0x91f18edb080 <merge_file_cb>, cb_arg=0x7f7ffffc84f0, diff_content=1) at /home/semarie/repos/openbsd/got/got/../lib/diff.c:634
#8  0x0000091f18ecefa4 in merge_files (worktree=0x921bec5e580, fileindex=0x92175e39060, fileindex_path=0x9220371b380 "/tmp/c/rust-ports/.got/file-index", commit_id1=0x921a334ce40, commit_id2=0x921a334c3a0, repo=0x92172cc9800, progress_cb=0x91f18e98440 <update_progress>, progress_arg=0x7f7ffffc86b8, cancel_cb=0x91f18e97f60 <check_cancelled>, cancel_arg=0x0) at /home/semarie/repos/openbsd/got/got/../lib/worktree.c:2305
#9  0x0000091f18eceb49 in got_worktree_merge_files (worktree=0x921bec5e580, commit_id1=0x921a334ce40, commit_id2=0x921a334c3a0, repo=0x92172cc9800, progress_cb=0x91f18e98440 <update_progress>, progress_arg=0x7f7ffffc86b8, cancel_cb=0x91f18e97f60 <check_cancelled>, cancel_arg=0x0) at /home/semarie/repos/openbsd/got/got/../lib/worktree.c:2344
#10 0x0000091f18e93d9c in cmd_backout (argc=1, argv=0x7f7ffffc8818) at /home/semarie/repos/openbsd/got/got/got.c:5013
#11 0x0000091f18e8c551 in main (argc=2, argv=0x7f7ffffc8810) at /home/semarie/repos/openbsd/got/got/got.c:228

Thanks.
-- 
Sebastien Marie