-
Notifications
You must be signed in to change notification settings - Fork 561
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
B::Deparse bug on OS X #13846
Comments
From bsi@hosember.huI'm using Storable freeze/thaw to pass data structures (mostly hashes and arrays) between the main thread and a background worker thread in my Perl application under OS X. Sometimes I also pass simple CODE blocks between these threads which works under Win32 well but fails miserably under OS X. I've found a workaround to my problem by patching B::Deparse to skip @ns elements in populate_curcvlex() if the element's class is NULL. The workaround (diff) is attached for Perl 5.18.2 |
From @jkeenanOn Thu May 15 09:53:38 2014, bsi@hosember.hu wrote:
Would you be able to provide a short program which illustrates the problem and which we could then turn into a test file? Lacking that, we would not be in a good position to evaluate the merits of your patch. Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From bsi@hosember.huIt wasn't easy to create an appropriate and short test code but eventually I did it. See the attached B_Deparse_test.pl which illustrates the problem. To be able to reproduce it you have to load a package which depends on package 'B'. In my real-world code I use JSON::PP but to illustrate the problem I've replaced it with DummyPackage.pm which simply loads 'B' exactly like JSON::PP. The other premise is that you have to use DIE signal handlers locally in the freezable sub, therefore I've added local $SIG{__DIE__}. Also during the testing it turned out that the problem is not OS X based, it also exists under Win32 too. What misleaded me earlier is that I used JSON XS under Windows and JSON PP under OS X. Please let me know if I could help anything else. Regards, On Sat May 17 09:04:03 2014, jkeenan wrote:
|
From @jkeenanOn Mon Jun 02 04:42:12 2014, bsi@hosember.hu wrote:
Can you attach (a) the failure output you get when running this program; and (b) the output of 'perl -V'? Thank you very much. |
From bsi@hosember.huSure, attached. On Mon Jun 02 05:42:35 2014, jkeenan wrote:
|
From bsi@hosember.huName "Storable::Deparse" used only once: possible typo at B_Deparse_test.pl line 9. |
From bsi@hosember.huSummary of my perl5 (revision 5 version 18 subversion 2) configuration: Characteristics of this binary (from libperl): |
From @rurbanI can confirm that this patch looks correct, but I don't fully understand it yet and I also had to protect new 5.18 padlists from being B::NULL in B::C, For me I got a NULL padlist with old code and IO::Compress::Gzip::getExtraParams. |
From @jkeenanI got remarkably similar output running on Linux x86_64. So this problem is definitely not specific to OS X. Error output and perl configuration attached. |
From @jkeenanSummary of my perl5 (revision 5 version 21 subversion 1) configuration: Characteristics of this binary (from libperl): |
From @jkeenanOn Mon Jun 02 06:58:32 2014, jkeenan wrote:
|
From @jkeenan$ ./perl -Ilib -I/home/jkeenan/learn/perl/p5p ~/learn/perl/p5p/121883-B_Deparse_test.pl |
From @rurbanSee also http://grokbase.com/t/perl/perl5-porters/13ayhsd2d9/padlist-null-pointer On Mon, Jun 2, 2014 at 8:59 AM, James E Keenan via RT
-- |
From @tonycozOn Sat May 17 09:04:03 2014, jkeenan wrote:
Here's a short reproducer: ./perl -Ilib -Mthreads -MB::Deparse -le '$d = B::Deparse->new(); sub foo { local @x; }; $t = threads->create(sub {$x = $d->coderef2text(\&foo) }); $t->join' Tony |
From @iabynOn Tue, Jun 17, 2014 at 11:20:02PM -0700, Tony Cook via RT wrote:
This appears to have been fixed sometime between 5.21.6 and 5.21.7: $ perl5216t -Mthreads -MB::Deparse -le '$d = B::Deparse->new(); sub foo { local @x; }; $t = threads->create(sub {$x = $d->coderef2text(\&foo) }); $t->join' $ perl5217t -Mthreads -MB::Deparse -le '$d = B::Deparse->new(); sub foo { local @x; }; $t = threads->create(sub {$x = $d->coderef2text(\&foo) }); $t->join' -- |
From @wolfsageOn Thu, Mar 26, 2015 at 9:40 AM, Dave Mitchell <davem@iabyn.com> wrote:
According to a bisect, fixed by one of: a2ddd1d But many of these couldn't be compiled until the final commit. (Also These were various updates of the form: commit 3e020df Use PADNAME rather than SV in pad.c:padlist_dup -- Matthew Horsfall (alh) |
@iabyn - Status changed from 'open' to 'pending release' |
From @khwilliamsonThanks for submitting this ticket The issue should be resolved with the release today of Perl v5.22. If you find that the problem persists, feel free to reopen this ticket -- |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#121883 (status was 'resolved')
Searchable as RT121883$
The text was updated successfully, but these errors were encountered: