Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

autoloaded colors() crashes with out of memory error



DISCLAIMER: this is my first email to zsh-users, be gentle :D

Hi,

I'm a collaborator within the oh-my-zsh project. One of our users[1] has
two boxes where he
connects via ssh, both at Digital Ocean, that crash whenever this code runs:

    autoload colors && colors

We've separated the statement, and we see that it crashes on `colors'. But
since the function is
autoloaded, we can't know what will run before we run it:

    $ autoload -t colors
    $ which colors
    colors () {
        # undefined
        # traced
        builtin autoload -Xt
    }
    $ colors
    colors:3: fatal error: out of memory
    Connection to server closed.

We tried using the `autoload +X` construct to force loading the definition
of the function so we can
see what's wrong with it, but that also run out of memory.[2]

We also tried sourcing directly the officially provided colors file from
/usr/share/zsh/functions/Misc/colors,
and colors worked fine.

Is there any way to find out where zsh is sourcing the colors definition
from, or is this a bug in itself?
Any response will be appreciated. Thanks!


[1] https://github.com/robbyrussell/oh-my-zsh/issues/1815
[2]
https://github.com/robbyrussell/oh-my-zsh/issues/1815#issuecomment-50936620

--
Marc


Messages sorted by: Reverse Date, Date, Thread, Author