Skip Menu |

This queue is for tickets about the Hash-SharedMem CPAN distribution.

Report information
The Basics
Id: 98065
Status: resolved
Priority: 0/
Queue: Hash-SharedMem

People
Owner: Nobody in particular
Requestors: fraserbn [...] gmail.com
Cc:
AdminCc:

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



Subject: newUNOP(OP_CUSTOM, ...) fails an assertion on debugging Perls
I imagine the patch below fixes this, but the module won't build on my Mac box for unrelated reasons, so I haven't been able to test it. diff --git a/lib/Hash/SharedMem.xs b/lib/Hash/SharedMem.xs index 051b3a4..38d8e04 100644 --- a/lib/Hash/SharedMem.xs +++ b/lib/Hash/SharedMem.xs @@ -2095,7 +2095,8 @@ static OP *THX_ck_entersub_args_hsm(pTHX_ OP *entersubop, pushop->op_sibling = cvop; lastargop->op_sibling = NULL; op_free(entersubop); - newop = newUNOP(OP_CUSTOM, 0, firstargop); + newop = newUNOP(OP_NULL, 0, firstargop); + newop->op_type = OP_CUSTOM; newop->op_ppaddr = DPTR2FPTR(Perl_ppaddr_t, CvXSUBANY(cv).any_ptr); return newop; }
On Fri Aug 15 22:39:24 2014, Hugmeir wrote: Show quoted text
> I imagine the patch below fixes this, but the module won't build on my > Mac box for unrelated reasons, so I haven't been able to test it. > > diff --git a/lib/Hash/SharedMem.xs b/lib/Hash/SharedMem.xs > index 051b3a4..38d8e04 100644 > --- a/lib/Hash/SharedMem.xs > +++ b/lib/Hash/SharedMem.xs > @@ -2095,7 +2095,8 @@ static OP *THX_ck_entersub_args_hsm(pTHX_ OP > *entersubop, > pushop->op_sibling = cvop; > lastargop->op_sibling = NULL; > op_free(entersubop); > - newop = newUNOP(OP_CUSTOM, 0, firstargop); > + newop = newUNOP(OP_NULL, 0, firstargop); > + newop->op_type = OP_CUSTOM; > newop->op_ppaddr = DPTR2FPTR(Perl_ppaddr_t, > CvXSUBANY(cv).any_ptr); > return newop; > }
That limitation (perl’s limitation, that it) makes custom ops a pain to use. Maybe it’s about time we addressed <https://rt.perl.org/Ticket/Display.html?id=94484>.
Subject: Re: [rt.cpan.org #98065] newUNOP(OP_CUSTOM, ...) fails an assertion on debugging Perls
Date: Sun, 17 Aug 2014 12:16:02 +0200
To: bug-Hash-SharedMem [...] rt.cpan.org
From: Brian Fraser <fraserbn [...] gmail.com>
On Sat, Aug 16, 2014 at 6:39 PM, Father Chrysostomos via RT <bug-Hash-SharedMem@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=98065 > > > On Fri Aug 15 22:39:24 2014, Hugmeir wrote:
>> I imagine the patch below fixes this, but the module won't build on my >> Mac box for unrelated reasons, so I haven't been able to test it. >> >> diff --git a/lib/Hash/SharedMem.xs b/lib/Hash/SharedMem.xs >> index 051b3a4..38d8e04 100644 >> --- a/lib/Hash/SharedMem.xs >> +++ b/lib/Hash/SharedMem.xs >> @@ -2095,7 +2095,8 @@ static OP *THX_ck_entersub_args_hsm(pTHX_ OP >> *entersubop, >> pushop->op_sibling = cvop; >> lastargop->op_sibling = NULL; >> op_free(entersubop); >> - newop = newUNOP(OP_CUSTOM, 0, firstargop); >> + newop = newUNOP(OP_NULL, 0, firstargop); >> + newop->op_type = OP_CUSTOM; >> newop->op_ppaddr = DPTR2FPTR(Perl_ppaddr_t, >> CvXSUBANY(cv).any_ptr); >> return newop; >> }
> > That limitation (perl’s limitation, that it) makes custom ops a pain to use. Maybe it’s about time we addressed <https://rt.perl.org/Ticket/Display.html?id=94484>.
Agreed -- If I get some free time, I'll poke at the core and see what can be done.
This was fixed in Hash-SharedMem-0.003.