https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88480
Bug ID: 88480 Summary: libiberty's use of VLAs causing stack overflow Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: tnfchris at gcc dot gnu.org CC: davidledger at live dot com.au Target Milestone: --- Originally reported as a binutils bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23906 libiberty uses two VLAs when demangling symbols https://github.com/gcc-mirror/gcc/blob/master/libiberty/cp-demangle.c#L4315 These VLAs when linking large C++ code bases with lots of templates cause a stack exhaustion. These should probably just be normal heap allocations so they scale properly.