On 13/05/17 15:40, Juan Francisco Cantero Hurtado wrote:
On Sat, May 13, 2017 at 10:07:22AM +0100, Graham Stephens wrote:
Hi all,

I initially posted this on the sparc list, but have been asked to post here.

When running "wavpack -m blah.wav" (for md5 calculation), I get a core
dump with a message of 'Bus Error'.

It works ok for other switches I have tried.

This is on OBSD v6.1 with wavpack v5.1.0, on a blade 100.


Christian Weisgerber added the following comment:

"That is most likely an unaligned access error.

The usual approach is to build a package with debugging symbols
(CFLAGS="-g" INSTALL_STRIP="") and examine the core file with gdb.

Alas, I don't have any strict alignment machines at hand any longer.
I tried to reproduce it on aarch64, but that architecture (or at
least the CPU I have) doesn't seem to actually enforce alignment
despite the #define __STRICT_ALIGNMENT in <machine/endian.h>."


Sadly I wouldn't have a clue where to start with this; the last dump I
looked at was a mainframe one about 1000 years ago. ;)

Download the ports tree for OpenBSD 6.1:
$ cd /usr
$ cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_6_1 -P ports

Build the port with debug symbols:
$ cd /usr/ports/audio/wavpack
$ make clean=all
$ make CFLAGS="-g" INSTALL_STRIP="" package
$ make reinstall

Try to get a coredump:
$ wavpack -m blah.wav

If the program crashes with 'Bus Error':
$ gdb wavpack wavpack.core

In the gdb prompt, run:
bt
quit

Copy/paste the output. Don't remove the .core file, maybe the maintainer
will need more info.



Thanks, JF.

Here we go:

GNU gdb 6.3
This GDB was configured as "sparc64-unknown-openbsd6.1"...
Core was generated by `wavpack'.
Program terminated with signal 10, Bus error.
Loaded symbols for /usr/local/bin/wavpack
Reading symbols from /usr/local/lib/libwavpack.so.0.2...done.
Loaded symbols for /usr/local/lib/libwavpack.so.0.2
Reading symbols from /usr/lib/libm.so.10.0...done.
Loaded symbols for /usr/lib/libm.so.10.0
Reading symbols from /usr/local/lib/libiconv.so.6.0...done.
Loaded symbols for /usr/local/lib/libiconv.so.6.0
Reading symbols from /usr/lib/libc.so.89.3...done.
Loaded symbols for /usr/lib/libc.so.89.3
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  0x0000006928a1a2dc in byteReverse (buf=0xfffffffffffd1cbc "", longs=15)
    at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/md5.c:46
46              *(uint32 *) buf = t;
(gdb) bt
#0  0x0000006928a1a2dc in byteReverse (buf=0xfffffffffffd1cbc "", longs=15)
    at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/md5.c:46
#1  0x0000006928a1a51c in MD5Update (ctx=0xfffffffffffd1c88,
    buf=0x6b34a16000 "", len=262144)
    at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/md5.c:106
#2 0x0000006928a08818 in pack_audio (wpc=0x6b90885000, infile=0x6bd7c58868,
    qmode=0, new_order=0x0, md5_digest_source=0xfffffffffffd2298 "")
    at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/wavpack.c:2308
#3  0x0000006928a06cac in pack_file (infilename=0x6bfa2b24a0 "track1.wav",
    outfilename=0x6bfa2b30e0 "track1.wv", out2filename=0x0,
    config=0xfffffffffffd23d8)
    at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/wavpack.c:1889
#4  0x0000006928a04c70 in main (argc=0, argv=0xfffffffffffd2ed8)
    at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/wavpack.c:1270
(gdb) quit

Reply via email to