Skip to content
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

Module broken on 5.37.8 - needs logical_nparens populated into regexp structure. #39

Closed
demerphq opened this issue Jan 19, 2023 · 6 comments · Fixed by #40
Closed

Module broken on 5.37.8 - needs logical_nparens populated into regexp structure. #39

demerphq opened this issue Jan 19, 2023 · 6 comments · Fixed by #40
Assignees
Labels

Comments

@demerphq
Copy link
Contributor

demerphq commented Jan 19, 2023

In 5.37.8 we introduced logical_nparens as a complement to nparens. PCRE doesnt support branch reset properly so likely all you need to do is set the logical_nparens to nparens. I would push a PR for this, but i cant get Alien::PCRE2 to build right now.

See: Perl/perl5#20710

@mohawk2
Copy link

mohawk2 commented Jan 19, 2023

I'm hoping that's actually 5.37.8!

@rurban rurban self-assigned this Jan 19, 2023
@rurban rurban added the bug label Jan 19, 2023
@rurban
Copy link
Owner

rurban commented Jan 19, 2023

PR is fine, as the actions would test it then. If I would have added them already...

@rurban rurban changed the title Module broken on 5.38.8 - needs logical_nparens populated into regexp structure. Module broken on 5.37.8 - needs logical_nparens populated into regexp structure. Jan 19, 2023
@demerphq
Copy link
Contributor Author

I don't have a patch yet. I cant get it to build on 5.37 at all. You are messing with internal functions and variables in a way you shouldnt be. I cant get it to build without sticking

#define PERL_EXT
#define PERL_EXT_RE_BUILD

so that it can get access to PL_core_reg_engine, and even then you are trying to use Perl_re_op_compile which is not an API function in perl and is no longer visible to extensions.

I am not sure what to do here.

The fundamental fix I wanted to apply was to make sure that re->logical_nparens = re->parens, but the other issues are getting in the way. I am not sure if we should mark Perl_re_op_compile as available to extensions, or API or what. I think for that you should file an issue with perl but i am not sure why you want to access this function anyway. It looks like you are trying to make PCRE fallback to Perl, so maybe that is a good justification.

@rurban
Copy link
Owner

rurban commented Jan 19, 2023

Yes, I need to fallback, also in other re modules, such as hyperscan

@demerphq
Copy link
Contributor Author

Ok. I will push a patch to make this easier for you.

@demerphq
Copy link
Contributor Author

See Perl/perl5#20727

rurban pushed a commit that referenced this issue Jan 20, 2023
which took away PL_core_reg_engine and Perl_re_op_compile.
goodby re extensions.
See GH #39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants