On Wed, 28 Oct 2026 08:43:10 GMT, Matthias Baesken <[email protected]> wrote:
>> Not really, you can add one more parameter that can be used as an
>> accumulator for the result state so that you can check it after the sequence
>> of calls FD_ADD_POINT()
>
> Yeah I agree, we can do this. Any idea what do to then in case of
> alloc-failure in the StoreFixedLine function? Just return early? Or change
> the function from void to some other return type to indicate failure/success ?
> Do you maybe already have some good example in the java2d C code I can use
> here too?
I suppose we could add one more field to the ProcessHandler structure.
`typedef struct _ProcessHandler {`
`...`
`jint resultCode; // 0 - OK , 1 - Allocation error, ...`
`...`
`} ProcessHandler;`
Then use it in the ProcessPath() main loop to exit with JNI_FALSE on error.
The check could be inserted at the end of the loop, so we fail right after
processing some segment in the path.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33513#discussion_r4401908587