Re: RFR: 8304836: Make MALLOC_MIN4 macro more robust [v2]

2023-04-21 Thread Brent Christian
On Fri, 21 Apr 2023 16:22:02 GMT, Naoto Sato wrote: >> The current macro assumes the argument is `jint` because all locations pass >> `jint`. However, this would not work if a wider type such as `jlong` is >> passed. Removing the `unsigned` cast and make the condition explicit would >> make th

Re: RFR: 8304836: Make MALLOC_MIN4 macro more robust [v2]

2023-04-21 Thread Naoto Sato
On Fri, 21 Apr 2023 12:42:24 GMT, David Schlosnagle wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update src/java.base/share/native/libjava/jni_util.c >> >> Co-authored-by: David Schlosnagle > > src/java.base

Re: RFR: 8304836: Make MALLOC_MIN4 macro more robust [v2]

2023-04-21 Thread Naoto Sato
> The current macro assumes the argument is `jint` because all locations pass > `jint`. However, this would not work if a wider type such as `jlong` is > passed. Removing the `unsigned` cast and make the condition explicit would > make the macro more robust. Naoto Sato has updated the pull requ

Re: RFR: 8304836: Make MALLOC_MIN4 macro more robust

2023-04-21 Thread David Schlosnagle
On Thu, 20 Apr 2023 18:39:29 GMT, Naoto Sato wrote: > The current macro assumes the argument is `jint` because all locations pass > `jint`. However, this would not work if a wider type such as `jlong` is > passed. Removing the `unsigned` cast and make the condition explicit would > make the ma

Re: RFR: 8304836: Make MALLOC_MIN4 macro more robust

2023-04-20 Thread Brent Christian
On Thu, 20 Apr 2023 18:39:29 GMT, Naoto Sato wrote: > The current macro assumes the argument is `jint` because all locations pass > `jint`. However, this would not work if a wider type such as `jlong` is > passed. Removing the `unsigned` cast and make the condition explicit would > make the ma

RFR: 8304836: Make MALLOC_MIN4 macro more robust

2023-04-20 Thread Naoto Sato
The current macro assumes the argument is `jint` because all locations pass `jint`. However, this would not work if a wider type such as `jlong` is passed. Removing the `unsigned` cast and make the condition explicit would make the macro more robust. - Commit messages: - 8304836: