Change the GCC demangler to not use VLA. The rationale is that these VLAs
are allocated on the stack and they can become quite large - in particular
when the client is a C++ application using the Boost library.
In combination with the demanglers recursive nature this can quickly lead
to exhaustion of valgrind's per-thread stack (which cannot be dynamically
grown). Additionally, due to the large VLAs (I've seen a 32k array) we
could run out of stack space without issuing a prior warning and instead
just segfault. 
Therefore this patch allocates these arrays on the heap and frees them
later. Basically this is a respin of Joseph's r10385.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15029 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 file changed