diff options
author | Evan Nemerson <evan@coeus-group.com> | 2012-09-15 11:14:54 -0700 |
---|---|---|
committer | Evan Nemerson <evan@coeus-group.com> | 2012-09-15 16:27:50 -0700 |
commit | f402af94e8471c8314ee7a312260a776e4d6fbe2 (patch) | |
tree | 20e8bdde2803780ce1fecf5abf251fad407c7e4e | |
parent | 604758de122e00c87180947c4b9e6fe37a313255 (diff) | |
download | vala-f402af94e8471c8314ee7a312260a776e4d6fbe2.tar.gz |
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.
-rw-r--r-- | vapi/linux.vapi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vapi/linux.vapi b/vapi/linux.vapi index 199ee8011..da424d56b 100644 --- a/vapi/linux.vapi +++ b/vapi/linux.vapi @@ -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); |