-
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
BBC: Blead Breaks String::Random::Regexp::regxstring #22688
Comments
Error message:
|
I tried to bisect with:
However, the bisection quickly failed with:
More investigation needed. |
@jkeenan Is this on freebsd? If so, this bug report looks relevant: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278377#c12 |
Indeed, it was. Thanks for flagging that. Retrying bisection on Linux. |
As with other recent BBCs, the breaking commit was:
|
Hi, I am the author of String::Random::Regexp::regxstring I have just been alerted to this issue and that it also arises for perl 5.41.5. I have now installed 5.41.5 and indeed compilation failed. The compiler complains about the comment in the function signature, re: I have removed that comment and in my system and with perl 5.41.5 it compiles fine and passes all tests. Let me know if you want me to install a new version to fix or you want me to wait for you to investigate. My sin is that I have not really understood when and where are comments (C-style or Perl) allowed in XS code. So I am not sure at all that the comment I inserted inside the function signature was valid or not. For example, 5.38.2 allows a comment inside the function signature but not before function signature or after. many thanks, bliako |
On Tue, Oct 22, 2024 at 12:32:51AM -0700, Andreas Hadjiprocopis wrote:
I have removed that comment and in my system and with perl 5.41.5 it compiles fine and passes all tests.
Let me know if you want me to install a new version or you want me to wait for you to fix the parsing logic.
So, the original declaration was:
AV *
generate_random_strings_xs(SV *regx_SV, int N, ... /*optional params: int debug*/)
The XS parser doesn't (in general) recognise or parse C comments, so
previously the parser found that it couldn't parse this parameter
declaration:
'... /*optional params: int debug*/'
so it was silently accepting but ignoring the parameter, and treating it
as a placeholder. So in other words it was treating the XSUB as one which
must have exactly three args passed to it, the first two of which
will be converted and assigned to local vars.
By changing it to:
generate_random_strings_xs(SV *regx_SV, int N, ...)
It becomes an XSUB which accepts 2 or more (including 4,5,etc) args, and
only processes the first two.
Assuming the latter is the intended behaviour, then I'd recommend keeping
the change and making a new release. If instead you only want the code to
accept 2 or three parameters, then it might be better to include a dummy
parameter, e.g.
generate_random_strings_xs(SV *regx_SV, int N, int debug = 0/)
or wait to see what the outcome is on the discussion around issue
#22685.
…--
The Enterprise's efficient long-range scanners detect a temporal vortex
distortion in good time, allowing it to be safely avoided via a minor
course correction.
-- Things That Never Happen in "Star Trek" #21
|
Got it, thanks. I will remove the comment in the signature. I will update soon. |
This is a bug report for perl from "Carlos Guevara" [email protected],
generated with the help of perlbug 1.43 running under perl 5.41.6.
BBC: Blead Breaks String::Random::Regexp::regxstring
Please see http://fast-matrix.cpantesters.org/?dist=String::Random::Regexp::regxstring
Flags
Perl configuration
The text was updated successfully, but these errors were encountered: