I ran into this while writing a table-driven parser using hashes of
'keyword' => 'code-to-eval'. I wracked my code trying to figure out how
*I* was causing the leak. Finally, the idea hit me (in the shower, no
less :) that eval was responsible. So, here is the proverbial one-line
test case:
eval '1' while(1);
It takes about 2 minutes to consume the available VM on my Sparc ELC.
I'm running perl 5.001m compiled with gcc 2.7 (using system as & ld for
-pic support). Of historical note: it happens with perl 4.036 as well.
Cheers!
-- sky G.
Summary of my perl5 (patchlevel 1) configuration:
Platform:
osname=sunos, osver=4.1.3_u1, archname=sun4-sunos
uname='sunos scisdn9 4.1.3_u1 3 sun4c '
hint=recommended
Compiler:
cc='gcc', optimize='-O'
cppflags=''
ccflags ='-B/bin/'
ldflags ='-B/bin/'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, randbits=31
Libraries:
so=so
libpth=/lib /usr/lib /usr/ucblib /usr/local/lib
libs=-lnsl -ldbm -ldl -lm -lc -lposix
libc=/usr/lib/libc.so.1.9
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=
cccdlflags='-fpic', ccdlflags=' ', lddlflags='-assert nodefinitions'
'keyword' => 'code-to-eval'. I wracked my code trying to figure out how
*I* was causing the leak. Finally, the idea hit me (in the shower, no
less :) that eval was responsible. So, here is the proverbial one-line
test case:
eval '1' while(1);
It takes about 2 minutes to consume the available VM on my Sparc ELC.
I'm running perl 5.001m compiled with gcc 2.7 (using system as & ld for
-pic support). Of historical note: it happens with perl 4.036 as well.
Cheers!
-- sky G.
Summary of my perl5 (patchlevel 1) configuration:
Platform:
osname=sunos, osver=4.1.3_u1, archname=sun4-sunos
uname='sunos scisdn9 4.1.3_u1 3 sun4c '
hint=recommended
Compiler:
cc='gcc', optimize='-O'
cppflags=''
ccflags ='-B/bin/'
ldflags ='-B/bin/'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, randbits=31
Libraries:
so=so
libpth=/lib /usr/lib /usr/ucblib /usr/local/lib
libs=-lnsl -ldbm -ldl -lm -lc -lposix
libc=/usr/lib/libc.so.1.9
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=
cccdlflags='-fpic', ccdlflags=' ', lddlflags='-assert nodefinitions'