Repository navigation
Fix spelling in post-receive-email hook - #26
Closed
richardfearn wants to merge 1 commit into
Closed
richardfearn wants to merge 1 commit into
richardfearn wants to merge 1 commit into
Conversation
Member
|
Your change looks good, but all development for git happens on the git mailing list, and patches need to go there. See Documentation/SubmittingPatches for details. |
max630
pushed a commit
to max630/git
that referenced
this pull request
May 17, 2015
Fixes required to build Git for Windows with MSys2
max630
pushed a commit
to max630/git
that referenced
this pull request
May 17, 2015
Fixes required to build Git for Windows with MSys2
max630
pushed a commit
to max630/git
that referenced
this pull request
May 17, 2015
Fixes required to build Git for Windows with MSys2
max630
pushed a commit
to max630/git
that referenced
this pull request
May 17, 2015
Fixes required to build Git for Windows with MSys2
max630
pushed a commit
to max630/git
that referenced
this pull request
May 17, 2015
Fixes required to build Git for Windows with MSys2
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 20, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 20, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 20, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 21, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 21, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 21, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 24, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 25, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 25, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 26, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 29, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Apr 30, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
phillipwood
added a commit
to phillipwood/git
that referenced
this pull request
Jun 19, 2022
test-results/t0010-racy-git.out...
------------------------------------------------------------------------
Initialized empty Git repository in /__w/git/git/t/trash directory.t0010-racy-git/.git/
=================================================================
==7972==ERROR: AddressSanitizer: invalid-pointer-pair: 0x6020000004f0 0x6020000004ef
#0 0x7cfcbb in count_trailing_blank diff.c:621
#1 0x7cfe73 in check_blank_at_eof diff.c:637
#2 0x804cb9 in builtin_diff diff.c:3583
#3 0x809494 in run_diff_cmd diff.c:4428
#4 0x80ae96 in run_diff diff.c:4517
#5 0x80ae96 in diff_flush_patch diff.c:5870
git#6 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
#7 0x80cb6a in diff_flush diff.c:6552
git#8 0x7c831f in run_diff_files diff-lib.c:265
git#9 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#10 0x41e8c9 in run_builtin git.c:465
git#11 0x41e8c9 in handle_builtin git.c:719
git#12 0x41f9ac in run_argv git.c:786
git#13 0x41f9ac in cmd_main git.c:917
git#14 0x419515 in main common-main.c:56
git#15 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#16 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#17 0x41b494 in _start (git+0x41b494)
0x6020000004f0 is located 0 bytes inside of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
0x6020000004ef is located 1 bytes to the left of 7-byte region [0x6020000004f0,0x6020000004f7)
allocated by thread T0 here:
#0 0x7f8a847c291f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
#1 0xc30972 in do_xmalloc wrapper.c:51
#2 0xc30afd in do_xmallocz wrapper.c:85
#3 0xc30afd in do_xmallocz wrapper.c:75
#4 0xc30afd in xmallocz wrapper.c:93
#5 0x97fbe1 in unpack_loose_rest object-file.c:1312
git#6 0x98d70c in loose_object_info object-file.c:1479
#7 0x98e270 in do_oid_object_info_extended object-file.c:1577
git#8 0x98e9fe in oid_object_info_extended object-file.c:1639
git#9 0x7f3204 in diff_populate_filespec diff.c:4100
git#10 0x7f3ab9 in diff_filespec_is_binary diff.c:3329
git#11 0x805ec6 in builtin_diff diff.c:3507
git#12 0x809494 in run_diff_cmd diff.c:4428
git#13 0x80ae96 in run_diff diff.c:4517
git#14 0x80ae96 in diff_flush_patch diff.c:5870
git#15 0x80cb6a in diff_flush_patch_all_file_pairs diff.c:6409
git#16 0x80cb6a in diff_flush diff.c:6552
git#17 0x7c831f in run_diff_files diff-lib.c:265
git#18 0x4ac215 in cmd_diff_files builtin/diff-files.c:82
git#19 0x41e8c9 in run_builtin git.c:465
git#20 0x41e8c9 in handle_builtin git.c:719
git#21 0x41f9ac in run_argv git.c:786
git#22 0x41f9ac in cmd_main git.c:917
git#23 0x419515 in main common-main.c:56
git#24 0x7f8a83bad55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
git#25 0x7f8a83bad60b in __libc_start_main_impl (/lib64/libc.so.6+0x2d60b)
git#26 0x41b494 in _start (git+0x41b494)
SUMMARY: AddressSanitizer: invalid-pointer-pair diff.c:621 in count_trailing_blank
==7972==ABORTING
Signed-off-by: Phillip Wood <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 26, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () To prevent this, add a flag REMOVE_DIR_SIGNAL that allows remove_dir_recurse() to know that a signal is being handled and avoid calling opendir(3). One implication of this change is that when signal handling, the temporary directory may not get cleaned up properly. Signed-off-by: John Cai <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 26, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () To prevent this, add a flag REMOVE_DIR_SIGNAL that allows remove_dir_recurse() to know that a signal is being handled and avoid calling opendir(3). One implication of this change is that when signal handling, the temporary directory may not get cleaned up properly. Signed-off-by: John Cai <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 26, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () To prevent this, add a flag REMOVE_DIR_SIGNAL that allows remove_dir_recurse() to know that a signal is being handled and avoid calling opendir(3). One implication of this change is that when signal handling, the temporary directory may not get cleaned up properly. Signed-off-by: John Cai <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 26, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () To prevent this, add a flag REMOVE_DIR_SIGNAL that allows remove_dir_recurse() to know that a signal is being handled and avoid calling opendir(3). One implication of this change is that when signal handling, the temporary directory may not get cleaned up properly. Signed-off-by: John Cai <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 27, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () Since we can't do the cleanup in a portable and signal-safe way, skip the cleanup when we're handling a signal. This means that when signal handling, the temporary directory may not get cleaned up properly. This is mitigated by b3cecf4 (tmp-objdir: new API for creating temporary writable databases, 2021-12-06) which changed the default name and allows gc to clean up these temporary directories. Signed-off-by: John Cai <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 27, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () Since we can't do the cleanup in a portable and signal-safe way, skip the cleanup when we're handling a signal. This means that when signal handling, the temporary directory may not get cleaned up properly. This is mitigated by b3cecf4 (tmp-objdir: new API for creating temporary writable databases, 2021-12-06) which changed the default name and allows gc to clean up these temporary directories. Signed-off-by: John Cai <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 28, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () Since we can't do the cleanup in a portable and signal-safe way, skip the cleanup when we're handling a signal. This means that when signal handling, the temporary directory may not get cleaned up properly. This is mitigated by b3cecf4 (tmp-objdir: new API for creating temporary writable databases, 2021-12-06) which changed the default name and allows gc to clean up these temporary directories. Signed-off-by: John Cai <[email protected]>
john-cai
added a commit
to john-cai/git
that referenced
this pull request
Sep 30, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () Since we can't do the cleanup in a portable and signal-safe way, skip the cleanup when we're handling a signal. This means that when signal handling, the temporary directory may not get cleaned up properly. This is mitigated by b3cecf4 (tmp-objdir: new API for creating temporary writable databases, 2021-12-06) which changed the default name and allows gc to clean up these temporary directories. In the event of a normal exit, we should still be cleaning up via the atexit() handler. Helped-by: Jeff King <[email protected]> Signed-off-by: John Cai <[email protected]>
gitster
pushed a commit
that referenced
this pull request
Oct 2, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () #6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> #8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 #9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 #10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 #11 0x0000557c19dbe5f4 in git_inflate_init () #12 0x0000557c19cee02a in unpack_compressed_entry () #13 0x0000557c19cf08cb in unpack_entry () #14 0x0000557c19cf0f32 in packed_object_info () #15 0x0000557c19cd68cd in do_oid_object_info_extended () #16 0x0000557c19cd6e2b in read_object_file_extended () #17 0x0000557c19cdec2f in parse_object () #18 0x0000557c19c34977 in lookup_commit_reference_gently () #19 0x0000557c19d69309 in mark_uninteresting () #20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () #21 0x0000557c19d21678 in for_each_ref () #22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () #23 0x0000557c19bc02b2 in cmd_receive_pack () #24 0x0000557c19b29fdd in handle_builtin () #25 0x0000557c19b2a526 in cmd_main () #26 0x0000557c19b28ea2 in main () Since we can't do the cleanup in a portable and signal-safe way, skip the cleanup when we're handling a signal. This means that when signal handling, the temporary directory may not get cleaned up properly. This is mitigated by b3cecf4 (tmp-objdir: new API for creating temporary writable databases, 2021-12-06) which changed the default name and allows gc to clean up these temporary directories. In the event of a normal exit, we should still be cleaning up via the atexit() handler. Helped-by: Jeff King <[email protected]> Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
rudyrigot
pushed a commit
to rudyrigot/git
that referenced
this pull request
Oct 28, 2022
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () Since we can't do the cleanup in a portable and signal-safe way, skip the cleanup when we're handling a signal. This means that when signal handling, the temporary directory may not get cleaned up properly. This is mitigated by b3cecf4 (tmp-objdir: new API for creating temporary writable databases, 2021-12-06) which changed the default name and allows gc to clean up these temporary directories. In the event of a normal exit, we should still be cleaning up via the atexit() handler. Helped-by: Jeff King <[email protected]> Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
gitster
pushed a commit
that referenced
this pull request
Sep 10, 2026
While running `git history reword` on a commit with `SANITIZE` flag set
to `address,leak`, we could observe a leak being reported (trace near
the end).
The root cause is as follows.
As part of rewording a commit, `commit_tree_ext` obtains the commit
message buffer from `repo_logmsg_reencode`. As we ask for no output
encoding, that function hands back the buffer from
`repo_get_commit_buffer` verbatim.
`repo_get_commit_buffer` returns the buffer cached in the commit slab
if there is one, and otherwise reads the object afresh via
`odb_read_object`. As the stacktrace below shows, we take the latter
path here. The buffer is uncached because the commit was parsed from
the commit-graph: such a parse is answered from the graph file alone,
so it never reads the object and never caches a buffer.
A buffer obtained this way is expected to be released with an
accompanying call to `repo_unuse_commit_buffer`, which takes care of
freeing it. This call is missing in the `commit_tree_ext` flow, thus
resulting in the leak.
Fix this by ensuring we call `repo_unuse_commit_buffer` on the
original_message buffer.
Using `repo_unuse_commit_buffer` is the correct way to release the
buffer since it frees only buffers the slab doesn't own. Plain free
would double-free on the cached path.
For those who are curious, the following is a minimal way to reproduce
the leak. Note the `git commit-graph --write` step, without which the
buffer comes from the commit slab and nothing leaks:
$ git init scratch
Initialized empty Git repository in /me/test-repos/scratch/.git/
$ cd scratch/
$ touch one && git add one && git commit -m "Commit one"
[main (root-commit) 2182f9c] Commit one
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 one
$ touch two && git add two && git commit -m "Commit two"
[main 5550f33] Commit two
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 two
$ git commit-graph write --reachable
$ git history reword HEAD --dry-run
update refs/heads/main eaded0872b14b3937605c77c0042429ca1e3bbe1
fd19e3776c75b8da9555c7c616ce0df9db7c6641
This leak could also be triggered in our test suite if we run
t3451-history-reword.sh as follows:
$ make SANITIZE=leak
$ cd t
$ GIT_TEST_COMMIT_GRAPH=1 ./t3451-history-reword.sh -v -i
=== Memory leak strack trace ===
==122337==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 263 byte(s) in 1 object(s) allocated from:
#0 0x7002c14fd9c7 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x5cdd008ec077 in do_xmalloc /me/git/wrapper.c:55
#2 0x5cdd008ec185 in do_xmallocz /me/git/wrapper.c:89
#3 0x5cdd008ec1fa in xmallocz /me/git/wrapper.c:97
#4 0x5cdd005b99d8 in unpack_loose_rest /me/git/object-file.c:216
#5 0x5cdd005e45f4 in read_object_info_from_path odb/source-loose.c:174
#6 0x5cdd005e4ba0 in odb_source_loose_read_object_info odb/source-loose.c:235
#7 0x5cdd005d9f83 in odb_source_read_object_info odb/source.h:413
#8 0x5cdd005daaed in odb_source_files_read_object_info odb/source-files.c:93
#9 0x5cdd005d1c8c in odb_source_read_object_info odb/source.h:413
#10 0x5cdd005d5bdd in do_oid_object_info_extended /me/git/odb.c:592
#11 0x5cdd005d7080 in odb_read_object_info_extended /me/git/odb.c:747
#12 0x5cdd005d75d8 in odb_read_object /me/git/odb.c:793
#13 0x5cdd003d9af7 in repo_get_commit_buffer /me/git/commit.c:399
#14 0x5cdd006739ed in repo_logmsg_reencode /me/git/pretty.c:716
#15 0x5cdd0012287a in commit_tree_ext builtin/history.c:134
#16 0x5cdd00122f33 in commit_tree_with_edited_message builtin/history.c:190
#17 0x5cdd00126e44 in cmd_history_reword builtin/history.c:748
#18 0x5cdd0012b051 in cmd_history builtin/history.c:1209
#19 0x5cdcfffb8faf in run_builtin /me/git/git.c:510
#20 0x5cdcfffb9ac6 in handle_builtin /me/git/git.c:786
#21 0x5cdcfffba358 in run_argv /me/git/git.c:869
#22 0x5cdcfffbaea9 in cmd_main /me/git/git.c:990
#23 0x5cdd0030f27f in main /me/git/common-main.c:9
#24 0x7002c102a1c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#25 0x7002c102a28a in __libc_start_main_impl ../csu/libc-start.c:360
#26 0x5cdcfffb4134 in _start (/home/sivaraam/.local/bin/git+0x217134)
(BuildId: 549c1036ab1f9f4fd55546e5bf31c7bd81b008fd)
SUMMARY: AddressSanitizer: 263 byte(s) leaked in 1 allocation(s).
Helped-by: Jeff King <[email protected]>
Signed-off-by: Kaartic Sivaraam <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
Derrick-MUGISHA
pushed a commit
to Derrick-MUGISHA/git
that referenced
this pull request
Oct 12, 2026
In the tmp-objdir api, tmp_objdir_create will create a temporary directory but also register signal handlers responsible for removing the directory's contents and the directory itself. However, the function responsible for recursively removing the contents and directory, remove_dir_recurse() calls opendir(3) and closedir(3). This can be problematic because these functions allocate and free memory, which are not async-signal-safe functions. This can lead to deadlocks. One place we call tmp_objdir_create() is in git-receive-pack, where we create a temporary quarantine directory "incoming". Incoming objects will be written to this directory before they get moved to the object directory. We have observed this code leading to a deadlock: Thread 1 (Thread 0x7f621ba0b200 (LWP 326305)): #0 __lll_lock_wait_private (futex=futex@entry=0x7f621bbf8b80 <main_arena>) at ./lowlevellock.c:35 #1 0x00007f621baa635b in __GI___libc_malloc (bytes=bytes@entry=32816) at malloc.c:3064 #2 0x00007f621bae9f49 in __alloc_dir (statp=0x7fff2ea7ed60, flags=0, close_fd=true, fd=5) at ../sysdeps/posix/opendir.c:118 #3 opendir_tail (fd=5) at ../sysdeps/posix/opendir.c:69 #4 __opendir (name=<optimized out>) at ../sysdeps/posix/opendir.c:92 #5 0x0000557c19c77de1 in remove_dir_recurse () git#6 0x0000557c19d81a4f in remove_tmp_objdir_on_signal () #7 <signal handler called> git#8 _int_malloc (av=av@entry=0x7f621bbf8b80 <main_arena>, bytes=bytes@entry=7160) at malloc.c:4116 git#9 0x00007f621baa62c9 in __GI___libc_malloc (bytes=7160) at malloc.c:3066 git#10 0x00007f621bd1e987 in inflateInit2_ () from /opt/gitlab/embedded/lib/libz.so.1 git#11 0x0000557c19dbe5f4 in git_inflate_init () git#12 0x0000557c19cee02a in unpack_compressed_entry () git#13 0x0000557c19cf08cb in unpack_entry () git#14 0x0000557c19cf0f32 in packed_object_info () git#15 0x0000557c19cd68cd in do_oid_object_info_extended () git#16 0x0000557c19cd6e2b in read_object_file_extended () git#17 0x0000557c19cdec2f in parse_object () git#18 0x0000557c19c34977 in lookup_commit_reference_gently () git#19 0x0000557c19d69309 in mark_uninteresting () git#20 0x0000557c19d2d180 in do_for_each_repo_ref_iterator () git#21 0x0000557c19d21678 in for_each_ref () git#22 0x0000557c19d6a94f in assign_shallow_commits_to_refs () git#23 0x0000557c19bc02b2 in cmd_receive_pack () git#24 0x0000557c19b29fdd in handle_builtin () git#25 0x0000557c19b2a526 in cmd_main () git#26 0x0000557c19b28ea2 in main () Since we can't do the cleanup in a portable and signal-safe way, skip the cleanup when we're handling a signal. This means that when signal handling, the temporary directory may not get cleaned up properly. This is mitigated by 22f3fab (tmp-objdir: new API for creating temporary writable databases, 2021-12-06) which changed the default name and allows gc to clean up these temporary directories. In the event of a normal exit, we should still be cleaning up via the atexit() handler. Helped-by: Jeff King <[email protected]> Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.