]> sourceware.org Git - glibc.git/commit
Add tests for Safe-Linking
authorEyal Itkin <eyalit@checkpoint.com>
Thu, 2 Apr 2020 11:26:35 +0000 (07:26 -0400)
committerCarlos O'Donell <carlos@redhat.com>
Fri, 3 Apr 2020 11:20:56 +0000 (07:20 -0400)
commit6310d570bf20348135d09e1f9de84a9ae7d06f83
tree62dc48f64b4dc824714690092f7baa4e146ce214
parent1c50d23a20f7b964bc5358dcffbb3623170b6773
Add tests for Safe-Linking

Adding the test "tst-safe-linking" for testing that Safe-Linking works
as expected. The test checks these 3 main flows:
 * tcache protection
 * fastbin protection
 * malloc_consolidate() correctness

As there is a random chance of 1/16 that of the alignment will remain
correct, the test checks each flow up to 10 times, using different random
values for the pointer corruption. As a result, the chance for a false
failure of a given tested flow is 2**(-40), thus highly unlikely.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
malloc/Makefile
malloc/tst-safe-linking.c [new file with mode: 0644]
This page took 0.039406 seconds and 5 git commands to generate.