[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: [ID 20000127.002] 5.005_63 `Out of memory' on trivial program with
On Thu, 27 Jan 2000 15:37:06 EST, Ilya Zakharevich wrote:
>mjd@plover.com writes:
>> "fish" =~ /fish/;
>> print @-;
>> ================================================================
>> Out of memory!
[...]
>I have usemymalloc=n now, but it does not help me reproduce your
>problem. I get "0" in both cases.
% gdb ./perl
(gdb) run -we '"fish" =~ /fish/; print @-;'
Starting program: /l2/src/p5p_repo_view/perlmulti/./perl -we '"fish" =~ /fish/; print @-;'
Out of memory!
Breakpoint 1, Perl_my_exit (my_perl=0x8169f70, status=1) at perl.c:3244
Source file is more recent than executable.
3244 switch (status) {
(gdb) bt
#0 Perl_my_exit (my_perl=0x8169f70, status=1) at perl.c:3244
#1 0x80b5d3e in Perl_safesysmalloc (size=1073741808) at util.c:106
#2 0x80c8343 in Perl_av_extend (my_perl=0x8169f70, av=0x816a940, key=135701757)
at av.c:119
#3 0x8105f07 in Perl_stack_grow (my_perl=0x8169f70, sp=0x816c168, p=0x816c168,
n=135701629) at scope.c:62
#4 0x80ce4bd in Perl_pp_rv2av (my_perl=0x8169f70) at pp_hot.c:504
#5 0x80cb7fc in Perl_runops_debug (my_perl=0x8169f70) at run.c:56
#6 0x805d87c in S_run_body (my_perl=0x8169f70, args=0xbffff92c) at perl.c:1236
#7 0x8105e6f in Perl_vdefault_protect (my_perl=0x8169f70, pcur_env=0xbffff940,
excpt=0xbffff9f0, body=0x805d670 <S_run_body>, args=0xbffff908) , pcur_env=0xbffff940,
excpt=0xbffff9f0, body=0x805d670 <S_run_body>) at scope.c:26
#9 0x805d317 in perl_run (my_perl=0x8169f70) at perl.c:1169
#10 0x8059820 in main (argc=3, argv=0xbffffa24, env=0xbffffa34) at perlmain.c:53
(gdb) up
at scope.c:45
#8 0x8105d45 in Perl_default_protect (my_perl=0x8169f70
(gdb) up
#2 0x80c8343 in Perl_av_extend (my_perl=0x8169f70, av=0x816a940, key=135701757)
at av.c:119
119 New(2,ary, newmax+1, SV*);
(gdb) p newmax
$2 = 268435451
(gdb) up
#3 0x8105f07 in Perl_stack_grow (my_perl=0x8169f70, sp=0x816c168, p=0x816c168,
n=135701629) at scope.c:62
62 av_extend(PL_curstack, (p - PL_stack_base) + (n) + 128);
(gdb) up
#4 0x80ce4bd in Perl_pp_rv2av (my_perl=0x8169f70) at pp_hot.c:504
504 EXTEND(SP, maxarg);
(gdb) l
499 }
500
501 if (GIMME == G_ARRAY) {
502 I32 maxarg = AvFILL(av) + 1;
503 (void)POPs; /* XXXX May be optimized away? */
504 EXTEND(SP, maxarg);
505 if (SvRMAGICAL(av)) {
506 U32 i;
507 for (i=0; i < maxarg; i++) {
508 SV **svp = av_fetch(av, i, FALSE);
(gdb) p maxarg
$3 = 135701629
(gdb) p av
$4 = (AV *) 0x81754f0
(gdb) p Perl_sv_dump(my_perl,av)
SV = PVAV(0x816bf24) at 0x81754f0
REFCNT = 1
FLAGS = (RMG)
IV = 0
NV = 0
MAGIC = 0x8176148
MG_VIRTUAL = 0x81692dc
MG_TYPE = 'D'
ARRAY = 0x0
FILL = -1
MAX = -1
ARYLEN = 0x0
FLAGS = (REAL)
$5 = void
I think av_fill() doesn't know about 'D' magic, as don't many other
functions in av.c.
Sarathy
gsar@ActiveState.com
- Follow-Ups from:
-
Ilya Zakharevich <ilya@math.ohio-state.edu>
- References to:
-
Ilya Zakharevich <ilya@math.ohio-state.edu>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]