Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 106709
Status: stalled
Priority: 0/
Queue: Params-Validate

People
Owner: Nobody in particular
Requestors: david.imbs [...] open-groupe.com
Cc:
AdminCc:

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



Subject: Strange XS return value
Date: Fri, 28 Aug 2015 16:29:13 +0200
To: <bug-params-validate [...] rt.cpan.org>
From: "IMBS David" <david.imbs [...] open-groupe.com>
Hello , I work with Params ::Validate quite a lot, and got recently a strange behavior with one callback checking. Somewhere on my program, I call validate with a callback check who can call thousands line of code, and use a lot of library. In 99% of case, all work fine. But there is a very much particular (I can reproduce) which lead validate returning undef without failing. In that case, the callback do return 1. Plus, when I call Data::Dumper on $_[1] inside that callback, it is recalled just after it ends infinitely. So I wonder, do validate is a safely reentrant method ? Or is that something else I do wrong ? I’m sorry I can’t put some code here, for some obvious reason. Here is some information about the system : Perl version 5.16.3 Some module used : - Rose::DB and Rose::DB::Object - Log4perl - DBI - JSON Note : that using the PP implementation works fine. David IMBS Réalisteur Tél : 02.99.12.54.06 - 02.99.12.71.71 Fax : 02.99.12.71.72 12 L Rue du Patis Tatelin – 35700 RENNES <mailto:david.imbs@open-groupe.com> david.imbs@open-groupe.com Description : cid:image002.gif@01CFCB5E.584F7380
Download image001.gif
image/gif 11.9k
image001.gif
On Fri Aug 28 10:29:29 2015, david.imbs@open-groupe.com wrote: Show quoted text
> Hello , > > > > I work with Params ::Validate quite a lot, and got recently a strange > behavior with one callback checking. > > > > Somewhere on my program, I call validate with a callback check who can call > thousands line of code, and use a lot of library. > > > > In 99% of case, all work fine. But there is a very much particular (I can > reproduce) which lead validate returning undef without failing. In that > case, the callback do return 1. > > > > Plus, when I call Data::Dumper on $_[1] inside that callback, it is recalled > just after it ends infinitely. > > > > So I wonder, do validate is a safely reentrant method ? Or is that something > else I do wrong ?
I just a wrote a simple test for re-entrancy and it worked. That said, you may be exposing a more complex corner case that doesn't. I don't know that I can fix this without a reproduction recipe.