Commit 351e8098 by Tim Van Patten Committed by Commit Bot

Increase demangled array size

The call to abi::__cxa_demangle() with too small of a char[] can cause segfaults or hangs. This change increases the array from 256 to 4096. Bug: angleproject:3553 Test: Verify validation layers don't segfault/hang Change-Id: I6704ff00bfab62c99eb288f803ccda35a037dd9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1670580Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
parent 87748543
......@@ -107,7 +107,10 @@ void PrintStackBacktrace()
Dl_info info;
if (dladdr(stack[i], &info) && info.dli_sname)
{
char demangled[256];
// Make sure this is large enough to hold the fully demangled names, otherwise we could
// segault/hang here. For example, Vulkan validation layer errors can be deep enough
// into the stack that very large symbol names are generated.
char demangled[4096];
size_t len = ArraySize(demangled);
int ok;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment