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

Found a simple expression that fails on OSX, in the latest TRE, but passes in ICU on OSX #9

Closed
dhoerl opened this issue Jul 3, 2013 · 2 comments · Fixed by #105
Closed
Assignees
Labels

Comments

@dhoerl
Copy link

dhoerl commented Jul 3, 2013

This expression succeeds when it should fail:

ret = tre_regcomp(&trx, "^(?:(?:(?:(?:(?:[0-9]){1,4}):){0,4})(?:(?:[0-9]){1,4}))?::$", REG_EXTENDED | REG_NOSUB);
test = "1:2:3:4:5:6::";
ret = tre_regexec(&trx, test, 0, NULL, 0);
@dag-erling
Copy link
Collaborator

dag-erling commented Jul 25, 2024

If you run this with debugging enabled (./configure --enable-debug) you will see that after AST expansion, there are two literal nodes with position 17, two with position 18, and two with position 19. Node positions are supposed to be unique. During AST expansion, new nodes may be created with the same positions as existing nodes, and when that happens the existing nodes are supposed to be renumbered, but this does not always happen as intended. I believe #105 fixes this.

@dhoerl dhoerl closed this as completed Jul 25, 2024
@dag-erling
Copy link
Collaborator

The PR hasn't been merged yet.

@dag-erling dag-erling reopened this Jul 25, 2024
@dag-erling dag-erling linked a pull request Jul 25, 2024 that will close this issue
@dag-erling dag-erling self-assigned this Jul 26, 2024
@dag-erling dag-erling added the bug label Jul 26, 2024
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.

2 participants