Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67157 - sqlite needs some alignement fix
Summary: sqlite needs some alignement fix
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Ferris McCormick (RETIRED)
URL: http://www.sqlite.org/cvstrac/tktview...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-11 14:26 UTC by Guy Martin (RETIRED)
Modified: 2004-10-12 08:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Martin (RETIRED) gentoo-dev 2004-10-11 14:26:54 UTC
Check sqlite-2.8.15.ebuild, I've added a fix for some bus error on hppa.
I think sparc is affected too.

To check if a already installed version if affected, just start sqlite and run "select sum(1));"

If it b0rk, you may consider adding some "use sparc" in the ebuild =)
Comment 1 Ferris McCormick (RETIRED) gentoo-dev 2004-10-11 15:52:43 UTC
Here is what I get on sparc:
 Mon Oct 11 22:39:09 2004 --> dev-db/sqlite-2.8.15
ferris@terciopelo:~/Packages/SNAKES/Snakes [331]% sqlite -version
2.8.15
ferris@terciopelo:~/Packages/SNAKES/Snakes [332]% sqlite 
SQLite version 2.8.15
Enter ".help" for instructions
sqlite> select sum(1);
1
sqlite> select sum(1));
SQL error: near ")": syntax error
sqlite> .quit
========================
ferris@terciopelo:~/Packages/SNAKES/Snakes [337]% sqlite Snakes
SQLite version 2.8.15
Enter ".help" for instructions
sqlite> select * from Inventory order by hatch;
2|Yig|Antaresia maculosa|M|2001-08-15|2003-01-12|LLL Reptiles
3|Abby|Antaresia maculosa|F|2002-07-02|2003-02-04|Bob Clark
1|Lilith|Antaresia maculosa|F|2002-07-04|2002-07-10|Bob Clark
sqlite> .quit
ferris@terciopelo:~/Packages/SNAKES/Snakes [338]%
============================

Which all seems normal.  I am reassigning this to myself; if I am missing something, please
provide a little more information.  I'll look at the patch later, but your example (select sum(1);) has no
problems.  Nor does data base creation and inquiry for me.

Regards,
Ferris
Comment 2 Guy Martin (RETIRED) gentoo-dev 2004-10-11 16:29:39 UTC
Oops sorry for the typo in the test case.
As I said, I was not sure that sparc was affected by this.

If it's not, please mark this bug as invalid and excuse me for the noise.
Comment 3 Ferris McCormick (RETIRED) gentoo-dev 2004-10-12 08:32:32 UTC
A little experimentation indicates that the compiler should always align the
structure Mem correctly for memcpy (which I suppose is where the fault comes from) on sparc.
If you come up with an instance in which sqlite fails on the structure in question, please
reopen with an example.

Sometimes sparc needs a little help with alignment to avoid Bus errors, but this does not seem to present such a case.