Re: smsd Mac OS X crash EXC_BAD_ACCESS

Daniele Forsi <[email protected]>
Newsgroups gmane.linux.drivers.gnokii
Message-ID <CAN_we7MAzehCHOW356FUiNsYqgL0Uvp2uisAGHqLpoS6+y3hTw@mail.gmail.com>
2013/1/19 helpFractal <stockton.simon@...>:

> (gdb) bt
> #0  0x00007fff8d690c55 in bzero$VARIANT$sse2 ()
> #1  0x00000001000eeb7e in gn_data_clear ()

> ... so there is something not quite right. I am not sure how to compile
> gnokii in debug mode (as I am installing from macports) so am a bit stuck in
> determining which file is causing this problem.

gn_data_clear () is in file common/gsm-common.c and it's only 1 line
so in this case you don't need more line numbers to see where it
fails:
GNOKII_API void gn_data_clear(gn_data *data)
{
        memset(data, 0, sizeof(gn_data));
}

so it seems that "data" isn't yet allocated when this function is
called, I can't imagine why (it works for me on Linux)

you can configure smsd to use the fake driver (model=fake) and if it
segfaults in the same place then we can look at what the fake.c and
atgen.c do in the same way

you can also use valgrind to see if uninitialized memory is used, just
add your usual command line after valgrind arguments:
valgrind --verbose --leak-check=full /opt/local/bin/smsd -u smsd -p
smsd -d online_smsd -c

you can also use smsd with the file module to see if it makes any
difference (--module file)
-- 
Daniele Forsi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.