2
Valgrind的報告一個SQLite錯誤:Valgrind報告了一個SQLite錯誤,爲什麼?
==11614== Jump to the invalid address stated on the next line ==11614== at 0x0: ??? ==11614== by 0x6E8CF: sqlite3MallocSize (sqlite3.c:19034) ==11614== by 0x6E472: mallocWithAlarm (sqlite3.c:18870) ==11614== by 0x6E520: sqlite3Malloc (sqlite3.c:18895) ==11614== by 0x6ED56: sqlite3MallocZero (sqlite3.c:19159) ==11614== by 0x6DA46: pthreadMutexAlloc (sqlite3.c:18039) ==11614== by 0x6D779: sqlite3MutexAlloc (sqlite3.c:17353) ==11614== by 0xFA4B7: sqlite3_initialize (sqlite3.c:112588) ==11614== by 0xFD895: openDatabase (sqlite3.c:114531) ==11614== by 0xFDF13: sqlite3_open (sqlite3.c:114780) ==11614== by 0x579C1: SqlLiteConnection_Connect(char*) (SqlLite.cpp:14) ==11614== Address 0x0 is not stack'd, malloc'd or (recently) free'd
我傳遞一個有效的價值sqlite3_open
。任何人有任何想法,爲什麼發生這種情況?
P.S.我正在使用SQLite Amalgamation 3.7.11版。我正在運行Mac OSX 10.7.3。 SQLite編譯爲gcc -c -g -m32 sqlite3.c
。