Skip Menu |

This queue is for tickets about the B-Generate CPAN distribution.

Report information
The Basics
Id: 6595
Status: resolved
Priority: 0/
Queue: B-Generate

People
Owner: jjore [...] cpan.org
Requestors: josh [...] grenekatz.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: specialsv_names[] is not populated
B::Generate includes a function make_sv_object which tests a pointer against specialsv_names. This appears to be a copy of the same function from perl-x.x.x/ext/B/B.xs. When I execute the program at http://perlmonks.org/index.pl?node_id=363215 perl segfaults because it does not find the pointer 0xc in the mentioned array. When I copy the specialsv_names initializing BOOT section from B.xs then B::Generate does not trigger a segfault (the segfault is because the special pointer was not recognized and perl attempted to defererence it). Please apply this patch. It corrects the problem for me.
diff -ru B-Generate-1.06/lib/B/Generate.xs B-Generate-1.06-fix/lib/B/Generate.xs --- B-Generate-1.06/lib/B/Generate.xs 2002-07-28 11:45:48.000000000 -0500 +++ B-Generate-1.06-fix/lib/B/Generate.xs 2004-06-11 13:34:27.599046160 -0500 @@ -425,6 +425,18 @@ MODULE = B::Generate PACKAGE = B PREFIX = B_ +BOOT: +{ + specialsv_list[0] = Nullsv; + specialsv_list[1] = &PL_sv_undef; + specialsv_list[2] = &PL_sv_yes; + specialsv_list[3] = &PL_sv_no; + specialsv_list[4] = pWARN_ALL; + specialsv_list[5] = pWARN_NONE; + specialsv_list[6] = pWARN_STD; +} + + void B_fudge() CODE:
fixed in 1.09