Commit f402af94 authored by Evan Nemerson's avatar Evan Nemerson
Browse files

linux: make backtrace_symbols return unowned

You are supposed to free() the result of backtrace_symbols, but not
each element in the array.  The current binding will free each element
which will likely result in a crash.  Since we don't currently support
owned arrays of unowned values (bug #571486), making the whole thing
unowned and leaking (unless you call free manually) is the best we can
do right now.
parent 604758de
......@@ -1029,7 +1029,7 @@ namespace Linux {
public int backtrace (void* buffer, int size);
[CCode (cheader_filename = "execinfo.h", array_length = false)]
public string[] backtrace_symbols (void* buffer, int size);
public unowned string[] backtrace_symbols (void* buffer, int size);
[CCode (cheader_filename = "execinfo.h")]
public void backtrace_symbols_fd (void* buffer, int size, int fd);
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