-
Notifications
You must be signed in to change notification settings - Fork 237
pcre2test: dynamically allocate buffer for JITTARGET #835
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
Conversation
zherczeg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better!
29ef209 to
e693142
Compare
zherczeg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this variant
86b2621 to
e1007ac
Compare
carenas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs squashing and a better commit message
| the Armv8.1 extension writes "ARM-64 (LSE) 64bit (little endian + unaligned)". | ||
| If JIT support is not available, PCRE2_ERROR_BADOPTION is returned, otherwise | ||
| the number of code units used is returned. This is the length of the string, | ||
| plus one code unit for the NUL character. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is missing an historical overview and an explanation of why the use of static buffers is discouraged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with it. I can revise it in the next commit
…ARGET Always ask `pcre2_config()` for the expected size of buffers and abort if it is too small, effectively avoiding to do the validation after it was written. In preparation for deprecating the use of static buffers, increase the documented max size for JITTARGET to the next power of 2.
Only lightly tested, could be used as a basic "solution" for #831, that could be easily backported for 10.47.