@@ -35,7 +35,7 @@ static void crash_test_corrupt_heap_underflow(void) {
35
35
36
36
#pragma GCC diagnostic push
37
37
#pragma GCC diagnostic ignored "-Wstringop-overflow" // that's what we want!
38
- memset (block - underflow_size , 0xDD , underflow_size );
38
+ memset (block - underflow_size , 0xDD , underflow_size ); // -V769
39
39
#pragma GCC diagnostic pop
40
40
41
41
free (block ); // should crash here (if compiled with DEBUG=1)
@@ -49,15 +49,15 @@ static void crash_test_corrupt_heap_overflow(void) {
49
49
const size_t overflow_size = 123 ;
50
50
uint8_t * block1 = malloc (block_size );
51
51
uint8_t * block2 = malloc (block_size );
52
- memset (block2 , 12 , 34 ); // simulate use to avoid optimization
52
+ memset (block2 , 12 , 34 ); // simulate use to avoid optimization // -V597 // -V1086
53
53
54
54
#pragma GCC diagnostic push
55
55
#pragma GCC diagnostic ignored "-Wstringop-overflow" // that's what we want!
56
- memset (block1 + block_size , 0xDD , overflow_size );
56
+ memset (block1 + block_size , 0xDD , overflow_size ); // -V769 // -V512
57
57
#pragma GCC diagnostic pop
58
58
59
59
uint8_t * block3 = malloc (block_size );
60
- memset (block3 , 12 , 34 ); // simulate use to avoid optimization
60
+ memset (block3 , 12 , 34 ); // simulate use to avoid optimization // -V597 // -V1086
61
61
62
62
free (block3 ); // should crash here (if compiled with DEBUG=1)
63
63
free (block2 );
0 commit comments