in reply to What perl operations will consume C stack space?
Here's about the simplest one I can come up with:
perl -wle '$n=32766; $_="a" x $n; /(ab*){$n}/'
On most implementations this will coredump; depending on stacksize, it may coredump for much lower $n.
See the #24274 regexp metabug for more detail.
Hugo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: What perl operations will consume C stack space?
by BrowserUk (Patriarch) on Feb 27, 2006 at 04:04 UTC | |
by hv (Prior) on Feb 27, 2006 at 11:01 UTC | |
by BrowserUk (Patriarch) on Feb 27, 2006 at 14:08 UTC | |
by Corion (Patriarch) on Feb 27, 2006 at 14:18 UTC | |
by hv (Prior) on Feb 27, 2006 at 15:33 UTC | |
by BrowserUk (Patriarch) on Feb 27, 2006 at 17:22 UTC | |
|
In Section
Seekers of Perl Wisdom