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

erts: fix binary offset bug in erl_bif_re #9478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

frazze-jobb
Copy link
Contributor

Closes GH-9438

@frazze-jobb frazze-jobb added team:VM Assigned to OTP team VM fix labels Feb 24, 2025
@frazze-jobb frazze-jobb requested a review from sverker February 24, 2025 10:48
@frazze-jobb frazze-jobb self-assigned this Feb 24, 2025
Copy link
Contributor

github-actions bot commented Feb 24, 2025

CT Test Results

    3 files    141 suites   50m 8s ⏱️
1 602 tests 1 553 ✅ 49 💤 0 ❌
2 311 runs  2 242 ✅ 69 💤 0 ❌

Results for commit 20c15e1.

♻️ 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

@@ -629,6 +629,7 @@ static bool get_iolist_as_bytes(Eterm iolist,

ERTS_GET_BITSTRING(iolist, *bytes_p, bit_offs, bit_sz);
if (!BIT_OFFSET(bit_offs) && !TAIL_BITS(bit_sz)) {
*bytes_p += BYTE_OFFSET(bit_offs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!
A testcase that tests regex as sub-binaries would be good. Maybe also test byte unaligned regex strings even if that is very unlikely to be used in practice.
Do we even have a testcase for subject strings as sub-binaries?

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OTP-28.0-rc1: re:run failes on some binaries, but not on others
2 participants