Skip to content

Fix Infinite Recursion in DUChain

Christoph Roick requested to merge croick/kdevelop:duchainrecursion into 5.4

For typedefs using forward-declared types like typedef struct Foo Foo;, getting the size information of the Foo alias will refer to itself.

The recursive call of declarationSizeInformation() may then lead to an infinite number of function calls and consequently to a stack overflow.

The fix ends the recursion if the type is recurring.

BUG: 396847

Edited by Christoph Roick

Merge request reports