On Tue, 27 Oct 2026 10:01:56 GMT, Matthias Baesken <[email protected]> wrote:
>> src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c line 1794:
>>
>>> 1792: if ((PTR)->plgPnts == (PTR)->dfPlgPnts) {
>>> \
>>> 1793: Point* _newp = (Point*)malloc(newMax*sizeof(Point));
>>> \
>>> 1794: if (_newp == NULL) break;
>>> \
>>
>> If we want to add this check, we should properly recover from the allocation
>> failure: return an error code to the caller and handle it there. Otherwise,
>> we’re just silencing the warning.
>
> Should we then convert the current macro FD_ADD_POINT to an (inline) function
> with a boolean return code?
> Currently the FD_ADD_POINT is only used at 2 places in StoreFixedLine; not
> sure what we would/should do there in case of alloc-failures.
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()
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33513#discussion_r4393055030