On Tue, Jan 12, 2010 at 04:11:05PM -0800, Rob Farmer wrote:
> Interesting - thanks for the info. Out of curiosity - what
> architecture is the machine you are trying to build fish on chombee?
> I'm wondering if I need to patch this for FreeBSD on non-i386
> architectures.

I think fish might be pretty broken on non-x86 architectures. Another
SDF user looked into it for me. We eventually managed to get fish to
compile (by adding -liconv to the makefile) and to start without core
dumping right away (by fixing divide by zero errors) but then it starts
segfaulting instead, after fixing that it started trying allocate
terabytes of memory, and after that it apparently works but hangs for a
long time on startup and then is very slow once it gets going.
Apparently:

*   There are a number of divisions where they don't check that the
    divisor is nonzero, and it often can be.
*   They also seem to assume that all ints are 32 bits.
*   It seems that for some reason it is trying to allocate an extremely
    large amount of memory, probably their assumption that an int is
    always 32 bits (they seem to happily shift left numbers and assume
    that the result is always 32 bits... not true on Alphas).

fish: Out of memory on line 1321 of file util.c, shutting down fish

"What fish is trying to do is to double the size of a memory buffer
every time it fails to vswprintf() to it. Without checking if the
error was "not enough space" or something else. As it happens, the
error is something else (there are a lot of "char *" strings where
the format asks for a "wchar_t *". Not sure where they managed to
see this working...)"

"Instead of looking for all places where they use a "wide" format
conversion but provide a "char" string, I've added a check for
EILSEQ (illegal byte sequence), and now fish starts without trying
to allocate a terabyte of RAM. In fact now it stops at a rather small
amount, which kind of helps."


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to