Re: [PATCH v3] pack-bitmap: remove checks before bitmap_free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2025年6月3日 23:14,Junio C Hamano <gitster@xxxxxxxxx> 写道:
> 
> It still is curious why this version did not fail for you, though.
> If setting it without exporting it still made "rev-list" traverse
> and expected result, wouldn't that mean we are not really testing
> what we want to test?
> 
>>>> + test_commit A &&
>>>> + git repack -adb &&
>>>> + test_commit B &&
>>>> +
>>>> + echo '1' >expect &&
>>>> + git rev-list --count --use-bitmap-index HEAD~1..HEAD >actual &&
>>>> + test_cmp expect actual
>>>> + )
>>>> +'
>>>> +
>>>> test_done
>>>> 
>>>> base-commit: 845c48a16a7f7b2c44d8cb137b16a4a1f0140229
>>> 
> 

No, this test case should only fail when ’SANITIZE_LEAK’ is set. I heard
that other developer call this type of test as prereq. So only when git is
compiled with `-fsanitize=address` and `export ASAN_OPTION=detect_leaks=1`
and without changes as

- if (!cascade_pseudo_merges_1(bitmap_git, cb.base, roots_bitmap))
- bitmap_free(roots_bitmap);
+ cascade_pseudo_merges_1(bitmap_git, cb.base, roots_bitmap);
+ bitmap_free(roots_bitmap);

This test case would fail.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux