git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [Bug report] Crash when creating patch
@ 2020-11-04 10:18 Johannes Postler
  2020-11-04 13:24 ` Jeff King
  0 siblings, 1 reply; 17+ messages in thread
From: Johannes Postler @ 2020-11-04 10:18 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

Dear git-team,
I was trying to create a patch file of a commit to another directory.
However, git crashed like that:

[josi@localhost typescript]$ git format-patch -1 236a9
--output=/home/josi/tmp/patches/txt-6117.patch
0001-Txture-Core-Implemented-whitelisting-for-groovy-scri.patch
free(): invalid pointer
Aborted (core dumped)

While I'm not entirely sure I interpreted the man page correctly, I
think the crash shouldn't happen anyway.

I'm using git 2.28.0, but my colleague is experiencing the same issue
with git 2.25.1.
Please find attached the output of git bugreport and some more debug
files that were collected by Fedora's ABRT. Please let me know if you
need any other output of ABRT.

Best regards,
johannes

Johannes Postler
DevOps & Consulting

Txture - The Cloud Transformation Platform
Grabenweg 68
A-6020 Innsbruck
johannes.postler@txture.io
www.txture.io

[-- Attachment #2: git-bugreport-2020-11-04-1101.txt --]
[-- Type: text/plain, Size: 4420 bytes --]

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
I tried to create a patch file of a commit in another directory using the following command:
[josi@localhost typescript]$ git format-patch -1 236a9 --output=/home/josi/tmp/patches/txt-6117.patch

What did you expect to happen? (Expected behavior)
I expected a patch file at the location specified in --output

What happened instead? (Actual behavior)
git crashed:
0001-Txture-Core-Implemented-whitelisting-for-groovy-scri.patch
free(): invalid pointer
Aborted (core dumped)

What's different between what you expected and what actually happened?
I didn't expect the crash :D

Anything else you want to add:
I do have a full core dump recorded by ABRT (Fedora). Please let me know at johannes.postler@txture.io if you need thaThe following is the backtrace according to ABRT:
{   "signal": 6
,   "executable": "/usr/bin/git"
,   "stacktrace":
      [ {   "crash_thread": true
        ,   "frames":
              [ {   "address": 139721002875845
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 252869
                ,   "function_name": "raise"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721002780836
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 157860
                ,   "function_name": "abort"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003147559
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 524583
                ,   "function_name": "__libc_message"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003179548
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 556572
                ,   "function_name": ".annobin_top_check.start"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003186412
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 563436
                ,   "function_name": "_int_free"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003104931
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 481955
                ,   "function_name": "fclose@@GLIBC_2.2.5"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 94420595460270
                ,   "build_id": "ba2b8ad417de884d751cd7503b17e9ce357b2dcf"
                ,   "build_id_offset": 538798
                ,   "function_name": "cmd_format_patch"
                ,   "file_name": "/usr/bin/git"
                }
              , {   "address": 94420595060875
                ,   "build_id": "ba2b8ad417de884d751cd7503b17e9ce357b2dcf"
                ,   "build_id_offset": 139403
                ,   "function_name": "handle_builtin.lto_priv.0"
                ,   "file_name": "/usr/bin/git"
                }
              , {   "address": 94420595041051
                ,   "build_id": "ba2b8ad417de884d751cd7503b17e9ce357b2dcf"
                ,   "build_id_offset": 119579
                ,   "function_name": "main"
                ,   "file_name": "/usr/bin/git"
                } ]
        } ]
}

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.28.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.8.16-300.fc33.x86_64 #1 SMP Mon Oct 19 13:18:33 UTC 2020 x86_64
compiler info: gnuc: 10.2
libc info: glibc: 2.32
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]
applypatch-msg
pre-applypatch
post-applypatch
pre-commit
pre-merge-commit
prepare-commit-msg
commit-msg
post-commit
pre-rebase
post-checkout
post-merge
pre-push
pre-receive
update
post-receive
post-update
push-to-checkout
pre-auto-gc
post-rewrite
sendemail-validate

[-- Attachment #3: core_backtrace --]
[-- Type: application/octet-stream, Size: 2746 bytes --]

{   "signal": 6
,   "executable": "/usr/bin/git"
,   "stacktrace":
      [ {   "crash_thread": true
        ,   "frames":
              [ {   "address": 139721002875845
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 252869
                ,   "function_name": "raise"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721002780836
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 157860
                ,   "function_name": "abort"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003147559
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 524583
                ,   "function_name": "__libc_message"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003179548
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 556572
                ,   "function_name": ".annobin_top_check.start"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003186412
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 563436
                ,   "function_name": "_int_free"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 139721003104931
                ,   "build_id": "2602cd2de6dc672a5ec4378ace0b4a68ea5b13ea"
                ,   "build_id_offset": 481955
                ,   "function_name": "fclose@@GLIBC_2.2.5"
                ,   "file_name": "/lib64/libc.so.6"
                }
              , {   "address": 94420595460270
                ,   "build_id": "ba2b8ad417de884d751cd7503b17e9ce357b2dcf"
                ,   "build_id_offset": 538798
                ,   "function_name": "cmd_format_patch"
                ,   "file_name": "/usr/bin/git"
                }
              , {   "address": 94420595060875
                ,   "build_id": "ba2b8ad417de884d751cd7503b17e9ce357b2dcf"
                ,   "build_id_offset": 139403
                ,   "function_name": "handle_builtin.lto_priv.0"
                ,   "file_name": "/usr/bin/git"
                }
              , {   "address": 94420595041051
                ,   "build_id": "ba2b8ad417de884d751cd7503b17e9ce357b2dcf"
                ,   "build_id_offset": 119579
                ,   "function_name": "main"
                ,   "file_name": "/usr/bin/git"
                } ]
        } ]
}

[-- Attachment #4: open_fds --]
[-- Type: application/octet-stream, Size: 348 bytes --]

0:/dev/pts/1
pos:	0
flags:	0102002
mnt_id:	28

1:/dev/pts/1
pos:	0
flags:	0102002
mnt_id:	28

2:/dev/pts/1
pos:	0
flags:	0102002
mnt_id:	28

3:/home/josi/tmp/patches/txt-6117.patch
pos:	0
flags:	0100001
mnt_id:	157

5:/home/josi/Txture/txture/.git/objects/pack/pack-8b55dea840db94cdc272330dfe69032eb8077991.pack
pos:	12
flags:	02100000
mnt_id:	157

[-- Attachment #5: crash_function --]
[-- Type: application/octet-stream, Size: 19 bytes --]

fclose@@GLIBC_2.2.5

[-- Attachment #6: maps --]
[-- Type: application/octet-stream, Size: 9436 bytes --]

55e002051000-55e00206c000 r--p 00000000 fd:01 2648988                    /usr/bin/git
55e00206c000-55e0022e1000 r-xp 0001b000 fd:01 2648988                    /usr/bin/git
55e0022e1000-55e00237f000 r--p 00290000 fd:01 2648988                    /usr/bin/git
55e002380000-55e002384000 r--p 0032e000 fd:01 2648988                    /usr/bin/git
55e002384000-55e002393000 rw-p 00332000 fd:01 2648988                    /usr/bin/git
55e002393000-55e0023d7000 rw-p 00000000 00:00 0 
55e002bfc000-55e002dba000 rw-p 00000000 00:00 0                          [heap]
7f1305631000-7f130567c000 r--p 00000000 fd:03 8127297                    /home/josi/Txture/txture/.git/objects/pack/pack-7c460afc8bff98d24b36ba5b8125abdfbbc5b661.pack
7f130567c000-7f134567c000 r--p 00000000 fd:03 8134171                    /home/josi/Txture/txture/.git/objects/pack/pack-8b55dea840db94cdc272330dfe69032eb8077991.pack
7f134567c000-7f13456f7000 r--p 00000000 fd:03 8126889                    /home/josi/Txture/txture/.git/objects/pack/pack-3fd239dbf9b0f3650a2b23982ee50f3272e99397.pack
7f13456f7000-7f1345702000 r--p 00000000 fd:03 8130325                    /home/josi/Txture/txture/.git/objects/pack/pack-5baab37654978c8292beed5151e18172669aa9cf.pack
7f1345702000-7f1345724000 r--p 00000000 fd:03 8129593                    /home/josi/Txture/txture/.git/objects/pack/pack-9969fb20a67801ec3e7eac49dfaedba5954e6d75.pack
7f1345724000-7f1346a7f000 r--p 00000000 fd:03 8130355                    /home/josi/Txture/txture/.git/objects/pack/pack-0aa11d9d23cd3fbce0baf771ed5f3d9941083e44.pack
7f1346a7f000-7f1346aff000 rw-p 00000000 00:00 0 
7f1346aff000-7f1346c22000 r--p 00000000 fd:03 8126860                    /home/josi/Txture/txture/.git/objects/info/commit-graph
7f1346c22000-7f1346c24000 r--p 00000000 fd:03 8130313                    /home/josi/Txture/txture/.git/objects/pack/pack-06d109d54d152773ff33656e55e64d79a8fc44a2.idx
7f1346c24000-7f1346c27000 r--p 00000000 fd:03 8130328                    /home/josi/Txture/txture/.git/objects/pack/pack-3fd239dbf9b0f3650a2b23982ee50f3272e99397.idx
7f1346c27000-7f1346c29000 r--p 00000000 fd:03 8130336                    /home/josi/Txture/txture/.git/objects/pack/pack-5baab37654978c8292beed5151e18172669aa9cf.idx
7f1346c29000-7f1346c2d000 r--p 00000000 fd:03 8130327                    /home/josi/Txture/txture/.git/objects/pack/pack-7c460afc8bff98d24b36ba5b8125abdfbbc5b661.idx
7f1346c2d000-7f1346c2f000 r--p 00000000 fd:03 8130347                    /home/josi/Txture/txture/.git/objects/pack/pack-7399aca83c64ecad4577dea0fcb33fff32837534.idx
7f1346c2f000-7f1346c34000 r--p 00000000 fd:03 8129572                    /home/josi/Txture/txture/.git/objects/pack/pack-a4d71fb1f73bea84d5a719d03107498eb19a0e84.idx
7f1346c34000-7f1346c39000 r--p 00000000 fd:03 8130361                    /home/josi/Txture/txture/.git/objects/pack/pack-0aa11d9d23cd3fbce0baf771ed5f3d9941083e44.idx
7f1346c39000-7f1346c3c000 r--p 00000000 fd:03 8127202                    /home/josi/Txture/txture/.git/objects/pack/pack-111b8c23e1b65fb3d870edde87b540ed359e2aec.idx
7f1346c3c000-7f1346c3e000 r--p 00000000 fd:03 8130346                    /home/josi/Txture/txture/.git/objects/pack/pack-9969fb20a67801ec3e7eac49dfaedba5954e6d75.idx
7f1346c3e000-7f1346c44000 r--p 00000000 fd:03 8129577                    /home/josi/Txture/txture/.git/objects/pack/pack-544060bb71fd868605c8a8065a895bdbe83fe718.idx
7f1346c44000-7f1346c46000 r--p 00000000 fd:03 8126870                    /home/josi/Txture/txture/.git/objects/pack/pack-3904e72de55d812f81041e0a324d7bb0102ab486.idx
7f1346c46000-7f1346c48000 r--p 00000000 fd:03 8129783                    /home/josi/Txture/txture/.git/objects/pack/pack-33677f12c9f70a519d3b2002fc644e446226ff37.idx
7f1346c48000-7f1346c4c000 r--p 00000000 fd:03 8129794                    /home/josi/Txture/txture/.git/objects/pack/pack-d34856887573db4eb0ee5099ca7db2eacf3987f7.idx
7f1346c4c000-7f1346c54000 r--p 00000000 fd:03 8129376                    /home/josi/Txture/txture/.git/objects/pack/pack-6d3f2b554d83df74b1577bbf6152d3f19e1478bb.idx
7f1346c54000-7f1346c58000 r--p 00000000 fd:03 8127894                    /home/josi/Txture/txture/.git/objects/pack/pack-bd767cf18a61f1360d5d6d6478236d55ffd4c560.idx
7f1346c58000-7f1346c5a000 r--p 00000000 fd:03 8127893                    /home/josi/Txture/txture/.git/objects/pack/pack-10e7ca3fd0389a97663cde6d8648f2153f5db3cd.idx
7f1346c5a000-7f1347659000 r--p 00000000 fd:03 8135274                    /home/josi/Txture/txture/.git/objects/pack/pack-8b55dea840db94cdc272330dfe69032eb8077991.idx
7f1347659000-7f134765c000 r--p 00000000 fd:03 8128277                    /home/josi/Txture/txture/.git/objects/pack/pack-3b618964d48aca5db679d52d629a485940c2b107.idx
7f134765c000-7f134765f000 r--p 00000000 fd:03 8128492                    /home/josi/Txture/txture/.git/objects/pack/pack-3844d029d438d274a602c59f9b8b563269f57970.idx
7f134765f000-7f1347661000 r--p 00000000 fd:03 8129251                    /home/josi/Txture/txture/.git/objects/pack/pack-b7c311e0942fa8924feddc8e6b141dd8aaf8d421.idx
7f1347661000-7f1347667000 r--p 00000000 fd:03 8128534                    /home/josi/Txture/txture/.git/objects/pack/pack-6440d87425558a5185baee37e0258207f28b4042.idx
7f1347667000-7f134766b000 r--p 00000000 fd:03 8128510                    /home/josi/Txture/txture/.git/objects/pack/pack-ddad15715f38cb98dae8af2fe0e5b4f391dc6d02.idx
7f134766b000-7f134766f000 r--p 00000000 fd:03 8127811                    /home/josi/Txture/txture/.git/objects/pack/pack-bdfc4bdd3d6a8dff2c0c439f1024c5ff09ee9d72.idx
7f134766f000-7f1347671000 r--p 00000000 fd:03 8128231                    /home/josi/Txture/txture/.git/objects/pack/pack-dd70f2c433a180964fedb9fae8278c8a4fa1e247.idx
7f1347671000-7f1347676000 r--p 00000000 fd:03 8128549                    /home/josi/Txture/txture/.git/objects/pack/pack-d3be3a64eeef10f43f948259609ec0b5cf17fd39.idx
7f1347676000-7f1347678000 r--p 00000000 fd:03 8128563                    /home/josi/Txture/txture/.git/objects/pack/pack-b00082a2dfb14e2effbf5fe4cb1a4dd93ef38179.idx
7f1347678000-7f1354ba8000 r--p 00000000 fd:01 2674896                    /usr/lib/locale/locale-archive
7f1354ba8000-7f1354baa000 rw-p 00000000 00:00 0 
7f1354baa000-7f1354bd0000 r--p 00000000 fd:01 2630541                    /usr/lib64/libc-2.32.so
7f1354bd0000-7f1354d1f000 r-xp 00026000 fd:01 2630541                    /usr/lib64/libc-2.32.so
7f1354d1f000-7f1354d6b000 r--p 00175000 fd:01 2630541                    /usr/lib64/libc-2.32.so
7f1354d6b000-7f1354d6c000 ---p 001c1000 fd:01 2630541                    /usr/lib64/libc-2.32.so
7f1354d6c000-7f1354d6f000 r--p 001c1000 fd:01 2630541                    /usr/lib64/libc-2.32.so
7f1354d6f000-7f1354d72000 rw-p 001c4000 fd:01 2630541                    /usr/lib64/libc-2.32.so
7f1354d72000-7f1354d76000 rw-p 00000000 00:00 0 
7f1354d76000-7f1354d7d000 r--p 00000000 fd:01 2674914                    /usr/lib64/libpthread-2.32.so
7f1354d7d000-7f1354d8d000 r-xp 00007000 fd:01 2674914                    /usr/lib64/libpthread-2.32.so
7f1354d8d000-7f1354d92000 r--p 00017000 fd:01 2674914                    /usr/lib64/libpthread-2.32.so
7f1354d92000-7f1354d93000 r--p 0001b000 fd:01 2674914                    /usr/lib64/libpthread-2.32.so
7f1354d93000-7f1354d94000 rw-p 0001c000 fd:01 2674914                    /usr/lib64/libpthread-2.32.so
7f1354d94000-7f1354d98000 rw-p 00000000 00:00 0 
7f1354d98000-7f1354d9b000 r--p 00000000 fd:01 2633211                    /usr/lib64/libz.so.1.2.11
7f1354d9b000-7f1354da9000 r-xp 00003000 fd:01 2633211                    /usr/lib64/libz.so.1.2.11
7f1354da9000-7f1354daf000 r--p 00011000 fd:01 2633211                    /usr/lib64/libz.so.1.2.11
7f1354daf000-7f1354db0000 ---p 00017000 fd:01 2633211                    /usr/lib64/libz.so.1.2.11
7f1354db0000-7f1354db1000 r--p 00017000 fd:01 2633211                    /usr/lib64/libz.so.1.2.11
7f1354db1000-7f1354db2000 rw-p 00000000 00:00 0 
7f1354db2000-7f1354db4000 r--p 00000000 fd:01 2671528                    /usr/lib64/libpcre2-8.so.0.10.0
7f1354db4000-7f1354e1d000 r-xp 00002000 fd:01 2671528                    /usr/lib64/libpcre2-8.so.0.10.0
7f1354e1d000-7f1354e46000 r--p 0006b000 fd:01 2671528                    /usr/lib64/libpcre2-8.so.0.10.0
7f1354e46000-7f1354e47000 r--p 00093000 fd:01 2671528                    /usr/lib64/libpcre2-8.so.0.10.0
7f1354e47000-7f1354e48000 rw-p 00094000 fd:01 2671528                    /usr/lib64/libpcre2-8.so.0.10.0
7f1354e48000-7f1354e4b000 rw-p 00000000 00:00 0 
7f1354e4b000-7f1354e66000 r--p 00000000 fd:03 8134188                    /home/josi/Txture/txture/.git/packed-refs
7f1354e66000-7f1354e67000 r--p 00000000 fd:01 2627250                    /usr/lib64/ld-2.32.so
7f1354e67000-7f1354e88000 r-xp 00001000 fd:01 2627250                    /usr/lib64/ld-2.32.so
7f1354e88000-7f1354e91000 r--p 00022000 fd:01 2627250                    /usr/lib64/ld-2.32.so
7f1354e91000-7f1354e92000 r--p 0002a000 fd:01 2627250                    /usr/lib64/ld-2.32.so
7f1354e92000-7f1354e94000 rw-p 0002b000 fd:01 2627250                    /usr/lib64/ld-2.32.so
7fff7d2e1000-7fff7d303000 rw-p 00000000 00:00 0                          [stack]
7fff7d355000-7fff7d359000 r--p 00000000 00:00 0                          [vvar]
7fff7d359000-7fff7d35b000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-11-05  6:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 10:18 [Bug report] Crash when creating patch Johannes Postler
2020-11-04 13:24 ` Jeff King
2020-11-04 13:25   ` [PATCH 1/3] format-patch: refactor output selection Jeff King
2020-11-04 17:01     ` Eric Sunshine
2020-11-04 17:13       ` Jeff King
2020-11-04 13:27   ` [PATCH 2/3] format-patch: tie file-opening logic to output_directory Jeff King
2020-11-04 17:03     ` Eric Sunshine
2020-11-04 13:29   ` [PATCH 3/3] format-patch: support --output option Jeff King
2020-11-04 17:27     ` Eric Sunshine
2020-11-04 19:15       ` Jeff King
2020-11-04 20:16         ` Eric Sunshine
2020-11-04 18:00     ` Junio C Hamano
2020-11-04 19:26   ` [PATCH v2] format-patch --output Jeff King
2020-11-04 19:28     ` [PATCH v2 1/3] format-patch: refactor output selection Jeff King
2020-11-04 19:28     ` [PATCH v2 2/3] format-patch: tie file-opening logic to output_directory Jeff King
2020-11-04 19:28     ` [PATCH v2 3/3] format-patch: support --output option Jeff King
2020-11-05  6:30     ` [PATCH v2] format-patch --output Johannes Postler

Code repositories for project(s) associated with this 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).