Mesa (master): gallium/util: limit STACK_LEN on Windows

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jun 20 07:11:56 UTC 2020


Module: Mesa
Branch: master
Commit: 2d6059d8877aed82f4a1a5fac10bca80bdf6ab0e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d6059d8877aed82f4a1a5fac10bca80bdf6ab0e

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Jun 16 11:15:39 2020 +0200

gallium/util: limit STACK_LEN on Windows

The Windows implementation of debug_backtrace_capture has a limiation
of max 62 frames in total. Subtract a start-frame of 1 and the wrapping
functions frame, and we land at 60.

So let's lower this number on Windows to avoid triggering an assert.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5497>

---

 src/gallium/auxiliary/util/u_debug_refcnt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c
index e0d2385bec7..f849e59cb3e 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.c
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.c
@@ -44,6 +44,7 @@
 #include "util/u_string.h"
 #include "util/u_hash_table.h"
 #include "os/os_thread.h"
+#include "pipe/p_config.h"
 
 int debug_refcnt_state;
 
@@ -113,7 +114,11 @@ debug_serial_delete(void *p)
 }
 
 
+#if defined(PIPE_OS_WINDOWS)
+#define STACK_LEN 60
+#else
 #define STACK_LEN 64
+#endif
 
 /**
  * Log a reference count change to the log file (if enabled).



More information about the mesa-commit mailing list