develooper Front page | perl.perl5.porters | Postings from March 2000

[ID 20000330.050] B::CC cannot sort

From:
Tom Christiansen
Date:
March 30, 2000 19:30
Subject:
[ID 20000330.050] B::CC cannot sort
Message ID:
9826.954473447@chthon
This simple program:

    for $k (sort { length $ENV{$b} <=> length $ENV{$a} } keys %ENV) {
	print "$k=$ENV{$k}\n";
    } 

Under B::Bytecode, produces correct results, then SEGVs

Under B::C, produces correct results, then exits correctly.

Under B::CC, produces no results, but goes into recursive 
    doom in the sort, eventually SEGVing for lack of memory
    in stack death.

--tom

#0  0x4015825e in tcgetattr ()
#1  0x40158535 in tcgetattr ()
#2  0x40158d6b in malloc ()
#3  0x40061e50 in Perl_safemalloc ()
#4  0x40076cd3 in S_more_xpv ()
#5  0x40076c7c in S_new_xpv ()
#6  0x400775f1 in L273 ()
#7  0x4007adfd in Perl_sv_setpvn ()
#8  0x4007ddd6 in Perl_newSVpvn ()
#9  0x4006d160 in Perl_hv_iterkeysv ()
#10 0x400aa655 in Perl_do_kv ()
#11 0x4008926c in Perl_pp_keys ()
#12 0x69e0 in pp_main () at /tmp/sort.p.c:1152
#13 0x4006f719 in Perl_runops_standard ()
#14 0x4009b6bd in sortcv ()
#15 0x4009ae99 in S_qsortsv ()
#16 0x40093590 in Perl_pp_sort ()
#17 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#18 0x4006f719 in Perl_runops_standard ()
#19 0x4009b6bd in sortcv ()
#20 0x4009ae99 in S_qsortsv ()
#21 0x40093590 in Perl_pp_sort ()
#22 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#23 0x4006f719 in Perl_runops_standard ()
#24 0x4009b6bd in sortcv ()
#25 0x4009ae99 in S_qsortsv ()
#26 0x40093590 in Perl_pp_sort ()
#27 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#28 0x4006f719 in Perl_runops_standard ()
#29 0x4009b6bd in sortcv ()
#30 0x4009ae99 in S_qsortsv ()
#31 0x40093590 in Perl_pp_sort ()
#32 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#33 0x4006f719 in Perl_runops_standard ()
#34 0x4009b6bd in sortcv ()
#35 0x4009ae99 in S_qsortsv ()
#36 0x40093590 in Perl_pp_sort ()
#37 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#38 0x4006f719 in Perl_runops_standard ()
#39 0x4009b6bd in sortcv ()
#40 0x4009ae99 in S_qsortsv ()
#41 0x40093590 in Perl_pp_sort ()
#42 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#43 0x4006f719 in Perl_runops_standard ()
#44 0x4009b6bd in sortcv ()
#45 0x4009ae99 in S_qsortsv ()
#46 0x40093590 in Perl_pp_sort ()
#47 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#48 0x4006f719 in Perl_runops_standard ()
#49 0x4009b6bd in sortcv ()
#50 0x4009ae99 in S_qsortsv ()
#51 0x40093590 in Perl_pp_sort ()
#52 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#53 0x4006f719 in Perl_runops_standard ()
#54 0x4009b6bd in sortcv ()
#55 0x4009ae99 in S_qsortsv ()
#56 0x40093590 in Perl_pp_sort ()
#57 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#58 0x4006f719 in Perl_runops_standard ()
#59 0x4009b6bd in sortcv ()
#60 0x4009ae99 in S_qsortsv ()
#61 0x40093590 in Perl_pp_sort ()
#62 0x6a0f in pp_main () at /tmp/sort.p.c:1155
#63 0x4006f719 in Perl_runops_standard ()

[the following 25000 identical stackframes deleted]



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About