segfault after regexp

Thomas Weber thomas.weber.mail at gmail.com
Sat Oct 11 07:52:31 CDT 2008


On Sat, Oct 04, 2008 at 11:40:04AM +0200, Thomas Weber wrote:
> Well, quoting pcrestack's man page:
> "As a very rough rule of thumb, you should reckon on about 500 bytes per
> recursion. Thus, if you want to limit your stack usage to 8Mb, you
> should set the limit at 16000 recursions. A 64Mb stack, on the  other
> hand,  can support around 128000 recursions. The pcretest test program
> has a command line option (-S) that can be used to increase the size of
> its stack."
> 
> So, we have some estimates, with a security factor of (say) 2, we should
> be alright. 
> 
> This doesn't address the important question though: what kind of memory
> limit do we pose on the stack?

Patch attached. I assume a maximum of 500MB on the stack (if there's no
hard limit), with a safety factor of 2.

	Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stack_usage.diff
Type: text/x-diff
Size: 3591 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20081011/2ecdff73/attachment-0001.bin 


More information about the Bug-octave mailing list