Skip to content

Commit b952c77

Browse files
WilliamTambellinislaren
authored andcommitted
ggml : add option to not print stack on abort (ggml/1081)
* Add option to not print stack on abort Add option/envvar to disable stack printing on abort. Also link some unittests with Threads to fix link errors on ubuntu/g++11. * Update ggml/src/ggml.c --------- Co-authored-by: Diego Devesa <[email protected]>
1 parent 4a9fc7b commit b952c77

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml/src/ggml.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ static void ggml_print_backtrace_symbols(void) {
128128
#endif
129129

130130
static void ggml_print_backtrace(void) {
131+
const char * GGML_NO_BACKTRACE = getenv("GGML_NO_BACKTRACE");
132+
if (GGML_NO_BACKTRACE) {
133+
return;
134+
}
131135
char attach[32];
132136
snprintf(attach, sizeof(attach), "attach %d", getpid());
133137
int pid = fork();

0 commit comments

Comments
 (0)