Skip to content

Fix wrong type cast - #1060

Open
zherczeg wants to merge 1 commit into
PCRE2Project:mainfrom
zherczeg:convert
Open

zherczeg wants to merge 1 commit into
PCRE2Project:mainfrom
zherczeg:convert

Conversation

@zherczeg

Copy link
Copy Markdown
Collaborator

Found by Aram Zahedi

Comment thread src/pcre2_jit_compile.c
/* We temporarily encode the needs_control_head in the lowest bit.
The real value should be short enough for this operation to work
without triggering Undefined Behaviour. */
data = (int)((short)((unsigned short)framesize << 1) | (needs_control_head ? 1 : 0));

@carenas carenas Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should update the ASSERT above to match

Found by Aram Zahedi
@NWilson

NWilson commented Oct 31, 2026

Copy link
Copy Markdown
Member

This one requires a backport, I believe.

@zherczeg

Copy link
Copy Markdown
Collaborator Author

Not much work needed. Added recently by a clang patch: #344

This branch has not been deployed

No deployments
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 this pull request may close these issues.

3 participants