Hi
I have a crash when running a sqlite based app on solaris machines in 64
bits mode. the crash is actually a bus error when executing an sqlite_exec.
As recommended in this forum ,when running with gdb, I found that the crash
is in this line:
pIndex->azColl[i] = zColl;
This is the stack in gdb:
-----------------------------------
=>[1] sqlite3CreateIndex(pParse = 0x1054c7078, pName1 = 0x1054b40b0,
pName2 = 0x1054b40d0, pTblName = 0x10549ecc8, pList = 0x102e86cf8, onError
= 0, pStart = 0x1054b4030, pEnd = 0x1054b4170, sortOrder = 0, ifNotExist =
0), line 82187 in "sqlite3.c"
[2] yy_reduce(yypParser = 0x1054b3fd8, yyruleno = 243), line 108821 in
"sqlite3.c"
[3] sqlite3Parser(yyp = 0x1054b3fd8, yymajor = 1, yyminor = RECORD,
pParse = 0x1054c7078), line 109257 in "sqlite3.c"
[4] sqlite3RunParser(pParse = 0x1054c7078, zSql = 0x1068309c8 "CREATE
INDEX IDX_OBJ on entries (obj_id, path);;", pzErrMsg = 0xffffffff73cfb178),
line 110082 in "sqlite3.c"
[5] sqlite3Prepare(db = 0x1053e7858, zSql = 0x1068309c8 "CREATE INDEX
IDX_OBJ on entries (obj_id, path);;", nBytes = -1, saveSqlFlag = 0,
pReprepare = (nil), ppStmt = 0xffffffff73cfb480, pzTail =
0xffffffff73cfb488), line 92441 in "sqlite3.c"
[6] sqlite3LockAndPrepare(db = 0x1053e7858, zSql = 0x1068309c8 "CREATE
INDEX IDX_OBJ on entries (obj_id, path);;", nBytes = -1, saveSqlFlag = 0,
pOld = (nil), ppStmt = 0xffffffff73cfb480, pzTail = 0xffffffff73cfb488),
line 92533 in "sqlite3.c"
[7] sqlite3_prepare(db = 0x1053e7858, zSql = 0x1068309c8 "CREATE INDEX
IDX_OBJ on entries (obj_id, path);;", nBytes = -1, ppStmt =
0xffffffff73cfb480, pzTail = 0xffffffff73cfb488), line 92596 in "sqlite3.c"
[8] sqlite3_exec(db = 0x1053e7858, zSql = 0x1068309c8 "CREATE INDEX
IDX_OBJ on entries (obj_id, path);;", xCallback = (nil), pArg = (nil),
pzErrMsg = 0xffffffff73cfb5d8), line 89103 in "sqlite3.c"
------------------------------------------------------------
What i get is a bus error, and it is related to bits alignment for azColl
Type of azColl is char ** e.g. on solaris64 (lp64) it must be % 8
(otherwise one gets SIGBUS, as far as I know...)
this is the pIndex struct content
print *pIndex *pIndex = {
zName = 0x1054931d6 "IDX_OBJ"
nColumn = 2
aiColumn = 0x1054931cc
aiRowEst = 0x1054931b0
pTable = 0x105493418
tnum = 0
onError = '\0'
autoIndex = '\0'
bUnordered = '\0'
zColAff = (nil)
pNext = (nil)
pSchema = 0x1053e8d88
aSortOrder = 0x1054931d4 ""
azColl = 0x1054931bc
}
The address of azColl is 0x1054931bc and it is %4 (but not 8) , i.e.
p (long)0x1054931bc
$1 = 88682940
(gdb) p 88682940.0/8
$2 = 11085367.5
any clue what can cause that ? is there a special build isntruction for
compiling sqlite.c on solaris ?
please advice
Tal
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users