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

Do not allow name characters immediately after a number #9104

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

richcarl
Copy link
Contributor

In cases such as "123a45", the scanner did not report an error, instead
returning two tokens '123' and 'a45'. The splitting point depends on the
base, so e.g., "16#12fg34" was scanned as '16#12f' and 'g34'. This change
makes the scanner reject numbers immediately followed by a name character.

The first commit fixes a testcase error that silently ignored some listed cases.

When the call to erl_scan succeeded returning more than one token,
for example "123_", the unexpected success was not detected.
Copy link
Contributor

github-actions bot commented Nov 23, 2024

CT Test Results

    2 files     96 suites   1h 7m 45s ⏱️
2 172 tests 2 124 ✅ 48 💤 0 ❌
2 533 runs  2 483 ✅ 50 💤 0 ❌

Results for commit 429dc57.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng self-assigned this Nov 24, 2024
@bjorng bjorng added the team:VM Assigned to OTP team VM label Nov 24, 2024
In cases such as "123a45", the scanner did not report an error, instead
returning two tokens '123' and 'a45'. The splitting point depends on the
base, so e.g., "16#12fg34" was scanned as '16#12f' and 'g34'. This change
makes the scanner reject numbers immediately followed by a name character.
@richcarl
Copy link
Contributor Author

Squashed. Should be done now.

@bjorng bjorng added fix testing currently being tested, tag is used by OTP internal CI labels Nov 27, 2024
@bjorng
Copy link
Contributor

bjorng commented Nov 27, 2024

Thanks for your pull request.

@bjorng bjorng merged commit 709aed9 into erlang:master Nov 29, 2024
24 checks passed
@richcarl richcarl deleted the scan-errors branch November 30, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants