On Tue, Jan 12, 2010 at 10:38 AM, chombee <[email protected]> wrote:
> Here's an attempt to produce some useful information with gdb:
>
> http://dpaste.com/144226/
>
> It looks like it at least identifies the location of the error as
> function hash_put() (the function is defined in util.c I think), but
> doesn't say much more than that. If there's a better way let me know. I
> wonder if I can compile fish with debug symbols to improve the
> backtrace?

You can set CFLAGS to -g to build with debugging symbols. I think I
have the gist of what's happening though:

Line 323 in util.c is:
        if( (float)(h->count+1)/h->size > 0.75f )
The problem is, the first time this is run, the hash table (h) is
empty, so h->size is 0 and you get a divide by zero error. I'm not
sure why this is only appearing on NetBSD, but I came across the
following comment in the configure script:

        #
        # -fno-optimize-sibling-calls seems to work around a bug where
        # sending a SIGWINCH to fish on NetBSD 3.0 causes fish to exit when
        # compiled with GCC 3.3.3. This is probably either a compiler bug
        # or a libc bug, but adding this flag seems to fix things for
        # now. Long term, the real problem should be tracked down and
        # truly fixed, at which point we can remove this silly flag. This
        # bug has been verified to not exist on Linux using GCC 3.3.3.
        #

It seems to suggest working around this by adding
-fno-optimize-sibling-calls to CFLAGS - you could try that. Also, on
FreeBSD the standard is to compile stuff with -fno-strict-aliasing in
CFLAGS - that may solve it too.

-- 
Rob Farmer

>
> On Tue, Jan 12, 2010 at 10:10:37AM -0800, Rob Farmer wrote:
>> On Tue, Jan 12, 2010 at 5:11 AM, chombee <[email protected]> wrote:
>> > You're exactly right, if I add the -liconv to Makefile.in then run:
>> >
>> >    ./configure --prefix=$HOME
>> >    gmake
>> >    gmake install
>> >
>> > it all works fine. But then when I run ~/bin/fish it does:
>> >
>> >    Floating point exception (core dumped)
>> >
>> > Drat!
>>
>> I'm not a great programmer so I can't promise any results, but if you
>> provide a backtrace I'll try and take a look.
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Fish-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fish-users
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to