FrancescAlted/blosc — Issue #3: Bus error on architectures that are not 32bit aligned
Author: avalentino
Created: 2012-02-26 17:53:12+00:00
State: open

See http://lists.alioth.debian.org/pipermail/debian-science-maintainers/2012-February/011508.html

```
Program received signal SIGBUS, Bus error.
blosc_d (blocksize=32768, leftoverblock=, src=0x132f543 "S", dest=0x1421808 "", tmp=0x1429810 "", tmp2=
0x1431830 "") at blosc/blosc.c:330
330 cbytes = sw32(((uint32_t *)(src))[0]); /* amount of compressed bytes */
(gdb) print src
$1 = (uint8_t *) 0x132f543 "S"
(gdb) print ((uint32_t *)(src))[0]
$2 = 1392508928
(gdb) print sw32(((uint32_t *)(src))[0])
$3 = 83
(gdb) print cbytes
$4 =
(gdb) bt
#0 blosc_d (blocksize=32768, leftoverblock=, src=0x132f543 "S", dest=0x1421808 "", tmp=0x1429810 "", tmp2=
0x1431830 "") at blosc/blosc.c:330
#1 0xf5bde754 in serial_blosc () at blosc/blosc.c:422
#2 0xf5be043c in blosc_filter (flags=257, cd_nelmts=6, cd_values=, nbytes=186, buf_size=0xffff84c8, buf=
0xffff84c4) at blosc/blosc_filter.c:229
#3 0xf5b36e04 in H5Z_pipeline () from /usr/lib/libhdf5.so.7
#4 0xf5917ca4 in H5D_chunk_lock () from /usr/lib/libhdf5.so.7
#5 0xf5918d28 in ?? () from /usr/lib/libhdf5.so.7
#6 0xf5918d28 in ?? () from /usr/lib/libhdf5.so.7
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

0xf5bddfd0 <+144>: call 0xf5be0060
0xf5bddfd4 <+148>: nop
0xf5bddfd8 <+152>: cmp %l2, %o0
0xf5bddfdc <+156>: bne,pn %icc, 0xf5bde0b0
0xf5bddfe0 <+160>: inc %l3
0xf5bddfe4 <+164>: add %i2, %i1, %i2
0xf5bddfe8 <+168>: add %l1, %o0, %l1
0xf5bddfec <+172>: cmp %l3, %l5
0xf5bddff0 <+176>: bge,pn %icc, 0xf5bde04c
0xf5bddff4 <+180>: add %l4, %o0, %l4
=> 0xf5bddff8 <+184>: ld [ %i2 ], %o0
0xf5bddffc <+188>: call 0xf5bddd40
0xf5bde000 <+192>: add %i2, 4, %i2
0xf5bde004 <+196>: mov %o0, %i1
0xf5bde008 <+200>: mov %l1, %o2
0xf5bde00c <+204>: mov %i2, %o0
0xf5bde010 <+208>: mov %i1, %o1
0xf5bde014 <+212>: cmp %i1, %l2
```