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

Check for overflows when calling jpy getIntValue #3839

Merged

Conversation

jmao-denver
Copy link
Contributor

@jmao-denver jmao-denver commented May 16, 2023

Fixes #3716

related to jpy-consortium/jpy#98
linked to: #3598

Note:
PyObject.getIntValue and family are also used in the generated formula code to cast a PyObject to a specified 'integer' type. Since casting in Java doesn't check for overflow, these use cases are not included as part of the change.

@jmao-denver jmao-denver added this to the May 2023 milestone May 16, 2023
@jmao-denver jmao-denver self-assigned this May 16, 2023
Copy link
Member

@devinrsmith devinrsmith left a comment

Choose a reason for hiding this comment

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

Do we have any tests on our side for these behavior?

@jmao-denver jmao-denver force-pushed the 3716-pyobj-getIntValue-overflow branch from f4d0a5a to 0c41ad4 Compare May 16, 2023 21:22
@jmao-denver jmao-denver merged commit 80e9025 into deephaven:main May 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2023
@jmao-denver jmao-denver deleted the 3716-pyobj-getIntValue-overflow branch June 16, 2023 14:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Properly handle returns from PyObject.getIntValue() where it is used due to its lossy nature with overflow
2 participants