File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,13 @@ void ggml_print_backtrace(void) {
147147 // 1. libdispatch "poisons" forked child processes
148148 // 2. lldb has issues attaching to parent from forked child
149149 // Use simple backtrace() instead to avoid Terminal.app crashes
150- ggml_print_backtrace_symbols ();
151- return ;
150+ const char * GGML_BACKTRACE_LLDB = getenv ("GGML_BACKTRACE_LLDB" );
151+ if (!GGML_BACKTRACE_LLDB ) {
152+ fprintf (stderr , "WARNING: Using native backtrace. (dangrous) Set GGML_BACKTRACE_LLDB for more info.\n" );
153+ fprintf (stderr , "See: https://github.com/ggml-org/llama.cpp/pull/17869\n" );
154+ ggml_print_backtrace_symbols ();
155+ return ;
156+ }
152157#endif
153158#if defined(__linux__ )
154159 FILE * f = fopen ("/proc/self/status" , "r" );
You can’t perform that action at this time.
0 commit comments