hyc@symas.com said:
Martin Lucina wrote:
martin@lucina.net said:
The only thing which is somewhat unusual is that I use musl libc (http://www.musl-libc.org/). However I also use this on my x86_64 dev boxes and everything works fine.
I'm currently building an eglibc toolchain for MIPS just to rule that possibility out.
Ruled out.
Built a toolchain for mips-unknown-linux-gnu, using GCC 4.8.1 (crosstool-NG 1.19.0) and configured with eglibc 2.17. mtest still fails with the same symptoms.
Martin
I wouldn't expect the libc to have affected this. I note that compiling with -Wcast-align produces no warnings on my x86-64 build, so it appears to be compiler-specific and not library specific.
The docs for -Wcast-align say:
Warn whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a char * is cast to an int * on machines where integers can only be accessed at two- or four-byte boundaries.
So the warning is arch-specific and thus will not trigger on x86(-64) which does not require aligned accesses for integers.
In a previous email you mentioned LMDB works fine on SPARC. That is not what I see here, with 0.9.11 freshly cloned from gitorious:
$ uname -a SunOS erzika 5.10 Generic_141414-10 sun4u sparc SUNW,Sun-Blade-100 $ mkdir testdb $ dbx ./mtest (...) (dbx) run Running: mtest (process id 20724) Reading libc_psr.so.1 t@1 (l@1) signal SEGV (no mapping at the fault address) in mdb_txn_renew0 at 0x12ea4 0x00012ea4: mdb_txn_renew0+0x01e4: ld [%g2 + 76], %g2 (dbx) bt current thread: t@1 =>[1] mdb_txn_renew0(0x2fa88, 0x0, 0xffffffff, 0x0, 0x2f9f8, 0x2fa88), at 0x12ea4 [2] mdb_txn_begin(0xc, 0x0, 0x0, 0xffbff9bc, 0x2fa88, 0x2f9f8), at 0x1425c [3] main(0x2f638, 0xffbff9bc, 0xffbffa34, 0x2f55c, 0x2f9f0, 0xee), at 0x1ded8
I note that the CSW GCC 4.6.3 I'm using on SPARC also produces warnings when building mdb with -Wcast-align.
Martin