Hello,
I get a core dump running `git difftool` when there are no diffs. It is easy for me to reproduce this core dump. The attached bug report includes a stack trace.
I get a core dump running `git difftool` when there are no diffs. It is easy for me to reproduce this core dump. The attached bug report includes a stack trace.
Best regards,
Matt
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 ran `git difftool`. What did you expect to happen? (Expected behavior) I expected to see no diffs. What happened instead? (Actual behavior) Core dump generated (SIGSEGV). What's different between what you expected and what actually happened? I did not expect the core dump. Anything else you want to add: --- begin --- ⬢ [devenv@toolbx git]$ git diff ⬢ [devenv@toolbx git]$ git difftool --dir-diff -x echo Segmentation fault (core dumped) ⬢ [devenv@toolbx git]$ coredumpctl debug /usr/bin/git Hint: You are currently not seeing messages from other users and the system. Users in groups '4294967295', 'systemd-journal' can see all messages. Pass -q to turn off this notice. PID: 5719 (git) UID: 1000 (devenv) GID: 1000 (devenv) Signal: 11 (SEGV) Timestamp: Wed 2024-12-18 12:05:51 CST (8s ago) Command Line: git difftool --dir-diff -x echo Executable: /usr/bin/git Control Group: /user.slice/user-1000.slice/user@1000.service/user.slice/libpod-e39b0c074f66c6e76f339f5c9357f4c38ea39a7753d11cc57320be2220182f21.scope/container Unit: user@1000.service User Unit: libpod-e39b0c074f66c6e76f339f5c9357f4c38ea39a7753d11cc57320be2220182f21.scope Slice: user-1000.slice Owner UID: 1000 (devenv) Boot ID: 17325c4533ab4a278e85bb97a94cd3de Machine ID: e6a7c524d21a41868bd9d5773b00278e Hostname: toolbx Storage: /var/lib/systemd/coredump/core.git.1000.17325c4533ab4a278e85bb97a94cd3de.5719.1734545151000000.zst (present) Size on Disk: 48K Package: git/2.47.1-1.fc41 build-id: 7623d17d0af420c0f1280a13d32b0bb528ab673c Message: Process 5719 (git) of user 1000 dumped core. Module libz.so.1 from rpm zlib-ng-2.1.7-3.fc41.aarch64 Module libpcre2-8.so.0 from rpm pcre2-10.44-1.fc41.1.aarch64 Module git from rpm git-2.47.1-1.fc41.aarch64 Stack trace of thread 5719: #0 0x0000ffff9a3eec50 free (libc.so.6 + 0x9ec50) #1 0x0000aaaae8aab484 hashmap_clear_.part.0 (git + 0x1ab484) #2 0x0000aaaae8956284 cmd_difftool (git + 0x56284) #3 0x0000aaaae890a640 handle_builtin.lto_priv.0 (git + 0xa640) #4 0x0000aaaae890ab84 run_argv.lto_priv.0 (git + 0xab84) #5 0x0000aaaae8905e00 main (git + 0x5e00) #6 0x0000ffff9a37629c __libc_start_call_main (libc.so.6 + 0x2629c) #7 0x0000ffff9a37637c __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2637c) #8 0x0000aaaae8906270 _start (git + 0x6270) ELF object binary architecture: AARCH64 GNU gdb (Fedora Linux) 15.2-3.fc41 Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/git... This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.fedoraproject.org/> Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Reading symbols from /var/home/devenv/.cache/debuginfod_client/7623d17d0af420c0f1280a13d32b0bb528ab673c/debuginfo... [New LWP 5719] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `git difftool --dir-diff -x echo'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __GI___libc_free (mem=<optimized out>) at malloc.c:3375 3375 if (chunk_is_mmapped (p)) /* release mmapped memory. */ (gdb) bt #0 __GI___libc_free (mem=<optimized out>) at malloc.c:3375 #1 0x0000aaaae8aab484 [PAC] in hashmap_clear_ (map=0xffffead71538, entry_offset=<optimized out>) at /usr/src/debug/git-2.47.1-1.fc41.aarch64/hashmap.c:208 #2 0x0000aaaae8956284 [PAC] in hashmap_clear_ (map=0xffffead71538, entry_offset=0) at /usr/src/debug/git-2.47.1-1.fc41.aarch64/hashmap.c:204 #3 run_dir_diff (extcmd=<optimized out>, symlinks=1, prefix=<optimized out>, child=0xffffead714c0) at builtin/difftool.c:667 #4 cmd_difftool (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>, repo=<optimized out>) at builtin/difftool.c:801 #5 0x0000aaaae890a640 [PAC] in run_builtin (p=0xaaaae8d003f0 <commands.lto_priv+912>, argc=4, argv=0xffffead723c0, repo=0xaaaae8d107d8 <the_repo.lto_priv>) at /usr/src/debug/git-2.47.1-1.fc41.aarch64/git.c:483 #6 handle_builtin (argc=4, argv=0xffffead723c0) at /usr/src/debug/git-2.47.1-1.fc41.aarch64/git.c:749 #7 0x0000aaaae890ab84 [PAC] in run_argv (argcp=0xffffead7210c, argv=0xffffead72128) at /usr/src/debug/git-2.47.1-1.fc41.aarch64/git.c:819 #8 0x0000aaaae8905e00 [PAC] in cmd_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/git-2.47.1-1.fc41.aarch64/git.c:954 #9 main (argc=5, argv=<optimized out>) at /usr/src/debug/git-2.47.1-1.fc41.aarch64/common-main.c:64 --- end --- 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.47.1 cpu: aarch64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh libcurl: 8.9.1 OpenSSL: OpenSSL 3.2.2 4 Jun 2024 zlib: 1.3.1.zlib-ng uname: Linux 6.12.4-200.fc41.aarch64 #1 SMP PREEMPT_DYNAMIC Mon Dec 9 20:24:04 UTC 2024 aarch64 compiler info: gnuc: 14.2 libc info: glibc: 2.40 $SHELL (typically, interactive shell): /bin/bash [Enabled Hooks] prepare-commit-msg