GNOME Bugzilla – Bug 582962
Sqlite3.vapi: Using the out errmsg parameter of get_table makes program crash
Last modified: 2009-05-17 18:02:20 UTC
Please describe the problem: If you use the out errmsg parameter of Database.get_table the compiled program crashes. It seems that the string needs to be freed with sqlite3_free instead of g_free Steps to reproduce: 1. Compile attached program 2. Run it Actual results: *** glibc detected *** /home/jens/tc-09: free(): invalid pointer: 0x09e3cb40 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb7dab604] /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7dad5b6] /opt/gnome2/lib/libglib-2.0.so.0(g_free+0x36)[0xb7f6ad46] /home/jens/tc-09[0x8048c9a] /home/jens/tc-09[0x8048cfd] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7d52775] /home/jens/tc-09[0x8048ad1] Expected results: do not crash Does this happen every time? yes Other information: I have no idea it it's better to use a weak string in the binding and make the developer use the Sqlite's free function explicitly or have a seperate string class for this.
Created attachment 134823 [details] test program
*** This bug has been marked as a duplicate of 579364 ***