Re: tin-2.0.0 segfaults in process_mapping()

Urs Janßen <[email protected]> Mon, 5 Sep 2011 20:01:22 +0200
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On Sun, Sep 04, 2011 at 04:12:32PM +0200, clemens fischer wrote:
>           CPPFLAGS = "-D_XOPEN_SOURCE=500"

looks strange for a linux system, I would expect -D_GNU_SOURCE.
When I set CPPFLAGS to -D_XOPEN_SOURCE=500 before doing configure I can
reproduce the error:

Program received signal SIGSEGV, Segmentation fault.
read_keymap_file () at ./keymap.c:414

as long as include/autoconf.h also has HAVE_STRSEP. As soon as I
undefine HAVE_STRSEP in include/autoconf.h it no longer crashes.

just a guess:

configure somehow defines _XOPEN_SOURCE=500 but doesn't honor it
when looking for strsep(3) which AFAIK is only available if _BSD_SOURCE
is defined (which is the case when _GNU_SOURCE is defined). I'd expect
it to fail at linking, but ...

Clemens, at a quick fix: after configure you could use something like
sed 's,define HAVE_STRSEP 1,undef HAVE_STRSEP,' -i include/autoconf.h

But the more interresting part is, why didn't you get _GNU_SOURCE defined
(did you manually set CPPFLAGS to -D_XOPEN_SOURCE=500?) and why did the
configure check still finds strsep...
Can you provide us your config.log?

Thomas would you mind looking into this?

urs
-- 
"Only whimps use tape backup: _real_ men just upload their important stuff
 on ftp, and let the rest of the world mirror it ;)" - Linus