mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
fix: segfault in panic when statically compiled
Co-authored-by: RoadToLP <ilya.titoff2013@yandex.ru>
This commit is contained in:
committed by
Christoffer Lerno
parent
e6c9cfed42
commit
6a2957faf7
@@ -61,7 +61,7 @@ def BacktraceFn = fn CInt(void** buffer, CInt size);
|
||||
fn CInt backtrace(void** buffer, CInt size)
|
||||
{
|
||||
if (size < 1) return 0;
|
||||
void* handle = libc::dlopen("libc.so.6", libc::RTLD_LAZY);
|
||||
void* handle = libc::dlopen("libc.so.6", libc::RTLD_LAZY|libc::RTLD_NODELETE);
|
||||
if (handle)
|
||||
{
|
||||
BacktraceFn backtrace_fn = libc::dlsym(handle, "backtrace");
|
||||
|
||||
Reference in New Issue
Block a user