infinite recursion
[
CWE-674
]
[
-Wanalyzer-infinite-recursion
]
19
foo_widget::draw (); /* { dg-warning "infinite recursion" } */
~~~~~~~~~~~~~~~~~^~
virtual void foo_widget::draw()
virtual void foo_widget::draw()
:
events 1-2
16
void foo_widget::draw ()
^~~~~~~~~~
|
(1) initial entry to ‘foo_widget::draw’
[...]
19
foo_widget::draw (); /* { dg-warning "infinite recursion" } */
~~~~~~~~~~~~~~~~~~~
|
(2) calling ‘foo_widget::draw’ from ‘foo_widget::draw’
virtual void foo_widget::draw()
virtual void foo_widget::draw()
:
events 3-4
16
void foo_widget::draw ()
^~~~~~~~~~
|
(3) recursive entry to ‘foo_widget::draw’; previously entered at (1)
(4) ⚠️ apparently infinite recursion
cluster_memory_regions
id_1
Stack
Frame: virtual void foo_widget::draw()
this_2(D)
struct foo_widget * const
INIT_VAL(this_2(D))
Frame: virtual void foo_widget::draw()
infinite recursion
[
CWE-674
]
[
-Wanalyzer-infinite-recursion
]
35
return *this; /* { dg-warning "infinite recursion" } */
^~~~~
boxed_int::operator int()
boxed_int::operator int()
:
events 1-2
33
boxed_int::operator int ()
^~~~~~~~~
|
(1) initial entry to ‘boxed_int::operator int’
34
{
35
return *this; /* { dg-warning "infinite recursion" } */
~~~~~
|
(2) calling ‘boxed_int::operator int’ from ‘boxed_int::operator int’
boxed_int::operator int()
boxed_int::operator int()
:
events 3-4
33
boxed_int::operator int ()
^~~~~~~~~
|
(3) recursive entry to ‘boxed_int::operator int’; previously entered at (1)
(4) ⚠️ apparently infinite recursion
cluster_memory_regions
id_1
Stack
Frame: boxed_int::operator int()
this_2(D)
struct boxed_int * const
INIT_VAL(this_2(D))
Frame: boxed_int::operator int()
_4
int
CONJURED(_4 = boxed_int::operator int (this_2(D));, _4)
infinite recursion
[
CWE-674
]
[
-Wanalyzer-infinite-recursion
]
44
return get_value (); /* { dg-warning "infinite recursion" } */
~~~~~~~~~~^~
T buggy_getter<T>::get_value() const [with T = int]
T buggy_getter<T>::get_value() const [with T = int]
:
events 1-2
42
T get_value () const
^~~~~~~~~
|
(1) initial entry to ‘buggy_getter<int>::get_value’
43
{
44
return get_value (); /* { dg-warning "infinite recursion" } */
~~~~~~~~~~~~
|
(2) calling ‘buggy_getter<int>::get_value’ from ‘buggy_getter<int>::get_value’
T buggy_getter<T>::get_value() const [with T = int]
T buggy_getter<T>::get_value() const [with T = int]
:
events 3-4
42
T get_value () const
^~~~~~~~~
|
(3) recursive entry to ‘buggy_getter<int>::get_value’; previously entered at (1)
(4) ⚠️ apparently infinite recursion
cluster_memory_regions
id_1
Stack
Frame: T buggy_getter<T>::get_value() const [with T = int]
this_2(D)
const struct buggy_getter * const
INIT_VAL(this_2(D))
Frame: T buggy_getter<T>::get_value() const [with T = int]
_4
int
CONJURED(_4 = buggy_getter<int>::get_value (this_2(D));, _4)
infinite recursion
[
CWE-674
]
[
-Wanalyzer-infinite-recursion
]
60
static_cast<D *>(this)->foo (); /* { dg-warning "-Wanalyzer-infinite-recursion" } */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
void C<D>::foo() [with D = D]
void C<D>::foo() [with D = D]
:
events 1-2
58
void foo ()
^~~
|
(1) initial entry to ‘C<D>::foo’
59
{
60
static_cast<D *>(this)->foo (); /* { dg-warning "-Wanalyzer-infinite-recursion" } */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
(2) calling ‘C<D>::foo’ from ‘C<D>::foo’
void C<D>::foo() [with D = D]
void C<D>::foo() [with D = D]
:
events 3-4
58
void foo ()
^~~
|
(3) recursive entry to ‘C<D>::foo’; previously entered at (1)
(4) ⚠️ apparently infinite recursion
cluster_memory_regions
id_1
Stack
Frame: void C<D>::foo() [with D = D]
this_2(D)
struct C * const
INIT_VAL(this_2(D))
Frame: void C<D>::foo() [with D = D]