Skip Menu |

This queue is for tickets about the Convert-Binary-C CPAN distribution.

Report information
The Basics
Id: 83167
Status: resolved
Priority: 0/
Queue: Convert-Binary-C

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.76
Fixed in: (no value)



Subject: SvNULL REFCNT test fails in newer perls
Somewhen apparently NULL was renamed to SvNULL. Sorry, I haven't checked in which perl version https://github.com/rurban/distroprefs/blob/ebe649fd81a07fc15d461487214f26 4ef7db2d02/sources/authors/id/R/RU/RURBAN/patches/Convert-Binary-C- 0.76.patch contains my patch -- Reini Urban
On Wed Feb 06 13:04:45 2013, RURBAN wrote: Show quoted text
> Somewhen apparently NULL was renamed to SvNULL. > Sorry, I haven't checked in which perl version > > https://github.com/rurban/distroprefs/blob/ebe649fd81a07fc15d461487214f26 > 4ef7db2d02/sources/authors/id/R/RU/RURBAN/patches/Convert-Binary-C- > 0.76.patch contains my patch
It was this commit: commit fe54beba3a096a44113f13da9f1b10564e27a60a Author: David Mitchell <davem@iabyn.com> Date: Tue Dec 18 23:41:29 2012 +0000 test the resetting of refcnt for immortals PL_sv_undef etc get given a very high ref count, which if it ever reaches zero, is set back to a high value. On debugging builds, use a lower value (1000) so that the resetting code gets exercised occasionally. Also, replace literal (~(U32)0)/2 with the constant SvREFCNT_IMMORTAL. The value of the refcount is now a lot lower (roughly 1000) where -DDEUBUGGING is defined: diff --git a/sv.h b/sv.h index e248ba7..09489b7 100644 --- a/sv.h +++ b/sv.h @@ -2061,6 +2061,13 @@ alternative is to call C<sv_grow> if you are not sure of the type of SV. #define SvIMMORTAL(sv) ((sv)==&PL_sv_undef || (sv)==&PL_sv_yes || (sv)==&PL_sv_no || (sv)==&PL_sv_placeholder) +#ifdef DEBUGGING + /* exercise the immortal resurrection code in sv_free2() */ +# define SvREFCNT_IMMORTAL 1000 +#else +# define SvREFCNT_IMMORTAL ((~(U32)0)/2) +#endif + /* =for apidoc Am|SV *|boolSV|bool b I guess that the most robust patch would be only to lower the sought after value if the version is v5.17.7 or later. Nicholas Clark
Fixed in Convert::Binary::C 0.77.
Fixed in Convert::Binary::C 0.77.