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.
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);