Bug path
test_5a
‘test_5a’
:
events 1-2
53
void test_5a (void)
^~~~~~~
|
(1) entry to ‘test_5a’
54
{
55
struct ptr_wrapper q = called_by_test_5a ();
~~~~~~~~~~~~~~~~~~~~
|
(2) calling ‘called_by_test_5a’ from ‘test_5a’
called_by_test_5a
‘called_by_test_5a’
:
events 3-4
46
called_by_test_5a (void)
^~~~~~~~~~~~~~~~~
|
(3) entry to ‘called_by_test_5a’
[...]
49
r.ptr = malloc (sizeof (int)); /* { dg-message "allocated here" } */
~~~~~~~~~~~~~~~~~~~~~
|
(4) allocated here
‘test_5a’
:
events 5-6
55
struct ptr_wrapper q = called_by_test_5a ();
^~~~~~~~~~~~~~~~~~~~
|
(5) returning to ‘test_5a’ from ‘called_by_test_5a’
56
} /* { dg-warning "leak of 'q.ptr'" } */
~
|
(6) ‘q.ptr’ leaks here; was allocated at (4)