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

Increase errno cache and guard against IOOBE #13254

Merged
merged 1 commit into from Feb 28, 2023
Merged

Increase errno cache and guard against IOOBE #13254

merged 1 commit into from Feb 28, 2023

Conversation

normanmaurer
Copy link
Member

Motivation:

In the past we cached up to 512 errno values and used this cache to lookup the string representation without checking if the value if > 512. This value might be a bit low as more errno values are added over the time.

Modifications:

  • Cache up to errno code 2048
  • Use JNI call if errno code was not cached and so not throw an IOOBE.

Result:

No more exceptions on un-cached errno codes

@normanmaurer normanmaurer added this to the 4.1.90.Final milestone Feb 28, 2023
Motivation:

In the past we cached up to 512 errno values and used this cache to lookup the string representation without checking if the value if > 512. This value might be a bit low as more errno values are added over the time.

Modifications:

- Cache up to errno code 2048
- Use JNI call if errno code was not cached and so not throw an IOOBE.

Result:

No more exceptions on un-cached errno codes
@normanmaurer normanmaurer merged commit 5d1f996 into 4.1 Feb 28, 2023
@normanmaurer normanmaurer deleted the errno branch February 28, 2023 13:43
normanmaurer added a commit that referenced this pull request Feb 28, 2023
Motivation:

In the past we cached up to 512 errno values and used this cache to lookup the string representation without checking if the value if > 512. This value might be a bit low as more errno values are added over the time.

Modifications:

- Cache up to errno code 2048
- Use JNI call if errno code was not cached and so not throw an IOOBE.

Result:

No more exceptions on un-cached errno codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants