My suspicion would be that you have a bug in your code which only shows up on Solaris.
Something is getting corrupted on the stack. Do your compilet support stack checking? I think you can use efence on Solaris http://perens.com/FreeSoftware/ElectricFence/ Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate ________________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Joe Mokos [jmo...@opnet.com] Sent: Wednesday, January 26, 2011 1:31 PM To: sqlite-users@sqlite.org Subject: EXTERNAL:[sqlite] Bus error on sqlite3_close on Sun Sparc w/SQLite 3.7.4 I've written an application that uses SQLite 3.7.4. The application runs fine on WinXP, AIX, HPUX and Linux. When I try to run on Solaris 5.8 SPARC I get a bus error when I call sqlite3_close. I get the following stack trace: (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where current thread: t@1 =>[1] t_delete(0x1b5ed0, 0xfefbc008, 0x40, 0x1b5e90, 0x1a3840, 0x38), at 0xfef427bc [2] realfree(0x1b5ec8, 0xfefc2858, 0xfefbc008, 0x1b5e90, 0x3b, 0x1b5e98), at 0xfef423dc [3] _free_unlocked(0xfefc27cc, 0xfefbc008, 0x2a57c8, 0xfefbc008, 0xffbede4a, 0x0), at 0xfef42c1c [4] free(0x2a57c8, 0xfefc3a54, 0xfefbfc78, 0xfefbfc78, 0xe9, 0x2a57c8), at 0xfef42b6c [5] sqlite3MemFree(0x2a57d0, 0xffffffff, 0xc, 0xfef91bf8, 0x1b5d40, 0x2a57c8), at 0x5a8cc [6] sqlite3_free(0x2a57d0, 0x2a5788, 0xc, 0x0, 0x1, 0x2cda28), at 0x5cad8 [7] sqlite3DbFree(0x0, 0x2a57d0, 0xc, 0x1b5d08, 0x1c9008, 0x1967a4), at 0x5cbf0 [8] sqliteDeleteColumnNames(0x0, 0x1b5c28, 0x25, 0x1b5d08, 0x6, 0x1b5aa8), at 0xb16f8 [9] sqlite3DeleteTable(0x0, 0x1b5c28, 0x1833d8, 0x0, 0x0, 0x0), at 0xb1884 [10] sqlite3SchemaFree(0x187b68, 0xfefc0458, 0xff05c000, 0x2, 0x187b68, 0x2c9430), at 0xb9088 [11] sqlite3ResetInternalSchema(0x187788, 0x0, 0x1ffc, 0x187938, 0x194258, 0x0), at 0xb1470 [12] sqlite3_close(0x187788, 0x0, 0x0, 0xfef88194, 0x194288, 0x0), at 0xe9070 [13] SqliteConsumer::disconnect(0x1833a8, 0xfefc0284, 0xfefc3a54, 0xfefbfc78, 0x15f1f6, 0xffbee634), at 0x51f5c [14] XML2SQLite::process(0x1833a8, 0x2e, 0x0, 0x0, 0x1, 0x180710), at 0x54298 [15] MetricUtility::doSqliteConsumerProcess(0x183380, 0x1833a8, 0x185558, 0x0, 0x1, 0x1c), at 0x4e404 [16] MetricUtility::process(0x183380, 0xffffffbc, 0xffbee93c, 0x3, 0xff0ea07c, 0x20), at 0x4e2f8 [17] main(0x7, 0xffbee93c, 0xffbee95c, 0x17e400, 0x0, 0x0), at 0x4e8f0 (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) I know from past experience the bus error usually indicates invalid memory alignment. In this case, however, the memory that it is attempting to free appears to be aligned properly. The memory is located at 0x002a57c8. I am using Sun Workshop 6 to compile both SQLite and my application. Does anyone have an idea of what could be causing the bus error? Joe Mokos _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users