New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SvPV details lost when dereferencing HASH/ARRAY after shared_clone #14842
Comments
From mark@markandruth.co.ukCreated by mark@markandruth.co.ukThis is a bug report for perl from mark@markandruth.co.uk, ----------------------------------------------------------------- A simple script like: use threads; Produces somewhat incorrect output on the first Dump statement compared A solution is to clone (using pure-perl) into the local thread using a sub _fix_dequeue { my $ref = ref $v or return $v; my $ret; return $ret; Here is the output of the first program on my computer showing the SV = IV(0x1311bb0) at 0x1311bc0 Perl Info
|
From perl@profvince.comLe 10/08/2015 06:47, Mark Zealey (via RT) a écrit :
This is not a bug but the normal behaviour of tied hashes, which are Vincent |
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Mon Aug 10 09:43:10 2015, perl@profvince.com wrote:
This code at https://github.com/mongodb/mongo-perl-driver/blob/master/perl_mongo.c#L642 looks incorrect to me: if (!SvOK(sv)) { Tony |
From @xdgOn Mon, Aug 10, 2015 at 7:37 PM, Tony Cook via RT <perlbug-followup@perl.org
I'd welcome any suggestions. The inner "if" is just (an inefficient) I can replicate the OP's problem on Perl's before 5.18. Looking at changes Doing the inverse on older Perls -- promoting private flags to public if David -- |
From @tonycozOn Mon, Aug 10, 2015 at 09:52:47PM -0400, David Golden wrote:
You don't need or want the if (!SvOK(sv)) test. The: if (SvGMAGICAL(sv)) { is essentially just SvGETMAGIC(): #define SvGETMAGIC(x) ((void)(UNLIKELY(SvGMAGICAL(x)) && mg_get(x)))
Code that wants to deal with older perls should probably check the Tony |
Migrated from rt.perl.org#125778 (status was 'open')
Searchable as RT125778$
The text was updated successfully, but these errors were encountered: