Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug report: zsh crashes when expanding long command from history.
On Oct 20, 12:47pm, Dorian Haglund wrote:
}
} That means if I type something like :
}
} '$ !8349'
}
} and hit the TAB button, zsh crashes.
For me it exits cleanly but with "fatal error: out of heap memory"
} The command is attached (it is 41111 characters long so I won't copy
} paste it here).
The history mechanism is using a short integer to track the position of
each word in the command line, so any command line longer than the
maximum value of a signed short is going to cause problems.
I don't have time today to dive further into this, but either we need
to change all the "short" to something larger in hist.c, or we need to
detect overflow and error out sooner, or most likely both.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author