Bug path

make_boxed_int
‘make_boxed_int’: events 1-2
19make_boxed_int (int i)
^~~~~~~~~~~~~~
|
(1) entry to ‘make_boxed_int’
20{
21 boxed_int *result = (boxed_int *)wrapped_malloc (sizeof (boxed_int));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
(2) calling ‘wrapped_malloc’ from ‘make_boxed_int’
wrapped_malloc
‘wrapped_malloc’: events 3-4
8void *wrapped_malloc (size_t size)
^~~~~~~~~~~~~~
|
(3) entry to ‘wrapped_malloc’
9{
10 return malloc (size);
~~~~~~~~~~~~~
|
(4) this call could return NULL
‘make_boxed_int’: events 5-6
21 boxed_int *result = (boxed_int *)wrapped_malloc (sizeof (boxed_int));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
(5) possible return of NULL to ‘make_boxed_int’ from ‘wrapped_malloc’
22 result->i = i; /* { dg-warning "dereference of possibly-NULL 'result'" } */
~~~~~~~~~~~~~
|
(6) ‘result’ could be NULL: unchecked value from (4)