Skip to content

Fix an issue with OTP28 and dispatch regexp compilation#8

Merged
mworrell merged 6 commits intomasterfrom
otp28-erl_syntax-error
Jun 19, 2025
Merged

Fix an issue with OTP28 and dispatch regexp compilation#8
mworrell merged 6 commits intomasterfrom
otp28-erl_syntax-error

Conversation

@mworrell
Copy link
Member

Fix #7

@mworrell mworrell changed the title Test on newer OTP versions [WIP] Fix an issue with OTP28 Jun 19, 2025
@mworrell
Copy link
Member Author

Problem is that re:compile on OTP28 returns a datatype with a reference(). Before OTP28 this was a binary.

OTP27:

1> re:compile(<<"/ab/">>).
{ok,{re_pattern,0,0,0,
                <<69,82,67,80,79,0,0,0,0,0,0,0,81,0,0,0,255,255,255,255,
                  255,255,...>>}}

OTP28:

1> re:compile(<<"/ab/">>).
{ok,{re_pattern,0,0,0,#Ref<0.1301874519.907149322.13759>}}

@mworrell mworrell changed the title [WIP] Fix an issue with OTP28 Fix an issue with OTP28 Jun 19, 2025
@mworrell mworrell changed the title Fix an issue with OTP28 Fix an issue with OTP28 and dispatch regexp compilation Jun 19, 2025
@mworrell
Copy link
Member Author

Fixed using term storage for storing the compiled regexp, instead of directly including the compiled regexp into the syntax trees.

@mworrell mworrell merged commit 028617b into master Jun 19, 2025
3 checks passed
@mworrell mworrell deleted the otp28-erl_syntax-error branch June 19, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on OTP28

1 participant