pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40178: sqlite3 test fails with bus error



>Number:         40178
>Category:       pkg
>Synopsis:       sqlite3 does not work on sparc64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 15 20:00:01 +0000 2008
>Originator:     Martin Husemann
>Release:        NetBSD 5.99.5
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD nelly.aprisoft.de 5.99.5 NetBSD 5.99.5 (NELLY.MP) #18: Fri Dec 
12 10:12:45 CET 2008 
martin%emmas.aprisoft.de@localhost:/nelly/usr/src/sys/arch/sparc64/compile/NELLY.MP
 sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Running the test harness in sqlite3 fails with a bus error on sparc64:

Core was generated by `testfixture'.
Program terminated with signal 10, Bus error.
#0  0x000000000015dc44 in balance_nonroot (pCur=0x420084a8) at sqlite3.c:38997
38997       p->aData = (void*)&p[1];
(gdb) list
38992     ** process of being overwritten.
38993     */
38994     for(i=0; i<nOld; i++){
38995       MemPage *p = apCopy[i] = (MemPage*)aCopy[i];
38996       memcpy(p, apOld[i], sizeof(MemPage));
38997       p->aData = (void*)&p[1];
38998       memcpy(p->aData, apOld[i]->aData, pBt->pageSize);
38999     }
39000   
39001     /*
(gdb) print p
$1 = (MemPage *) 0x40f51ab4

4 byte alignement is not enough...
The code tries to ensure 8 byte alignment, but I'm not sure I follow the
full logic of the scratch allocator and cells:

  aCopy[0] = (u8*)&szCell[nMaxCells];

szCells is only 4byte aligned and a pointer to 16bit values, nMaxCells is 84.

>How-To-Repeat:

   cd /usr/pkgsrc/databases/sqlite3-tcl && make test

>Fix:
somebody please pick this up...



Home | Main Index | Thread Index | Old Index