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

Re: Bug report: segfault when pasting (function and alias names collide)



On Jan 6,  2:29am, Daniel Shahaf wrote:
}
} All segfaults are bug, but how do you reproduce this one?

This was explained in the original thread from 2010 to which Victor
referred.  The crash is because of a stack overflow during the
infinite function-call recursion.  Zsh can't detect at runtime that
stack overflow is about to occur, so it sets a compile-time limit
on how deep the recursion is allowed to become.

If zsh is compiled on a machine with memory size X and then run on
a machine with memory size Y < X, the compile-time limit may be too
large and the recursion will continue until a fault results.

There is no practical fix for this, nor is there a practical way to
trap the fault and recover cleanly.



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