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

Re: zsh exhausting swap



On Sep 8,  1:19pm, Mike Fletcher wrote:
} Subject: Re: zsh exhausting swap
}
} >>>>> "Brad" == Brad Forschinger <bradf@xxxxxxxxxxx> writes:
} 
}     Brad> hit alt-' about ten times i guess, keep going until output
}     Brad> stops and swapping starts :-)
} 
} Program received signal SIGSEGV, Segmentation fault.
} #0  0x400938a7 in memcpy (dstpp=0x0, srcpp=0x43cb1018, len=21523344)
}     at ../sysdeps/generic/memcpy.c:55
} #1  0x4013f7cb in quoteline ()

I think this is going to have to go down as user silliness.

Why, in practice, would you ever need to hold down alt-' ?  I don't think
I've ever pressed it more than twice on the same command line.

What's happening is that, at each press of alt-', the line editor must
approximately triple the size of the internal editor buffer in order to
accommodate the new quoting characters (mostly closing and reopening
some existing quote pairs plus backslashing the characters thereby left
outside).  As you can imagine, this consumes rather a lot of memory in
rather a short time; the buffer is 59000 times larger by the end of the
tenth keypress.

The crash eventually occurs when a buffer as large as zsh needs cannot
be allocated.

However, I don't understand what you expect zsh to do differently.

(Also, the mailing list address is now zsh-workers@xxxxxxxxxxxxxx, not
@math.gatech.edu.  It is unknown for how long gatech will continue to
forward the messages.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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