RFR: 8342782: AWTEventMulticaster throws StackOverflowError using AquaButtonUI [v6]
Jeremy
duke at openjdk.org
Mon Dec 16 21:54:39 UTC 2024
On Sun, 24 Nov 2024 08:55:20 GMT, Laurent Bourgès <lbourges at openjdk.org> wrote:
>> Here is a constant declaration (hotspot friendly):
>> https://github.com/bourgesl/jdk-official/blob/d0b770c938be6b5b3a0176148265ef33184a9b8b/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java#L38
>>
>> private static final int ALL_BUT_LSB = 0xFFFFFFFE;
>
> '500 iterations' looks high, maybe 100?
> It is a recursion ? You could try max recursion depth + 3 samples (first, middle, last) ?
>
> Or this magic threshold could be tunable ac runtime using special static getter using a System property + default value, used by constant declaration (final static is mandatory):
>
> https://github.com/bourgesl/jdk-official/blob/d0b770c938be6b5b3a0176148265ef33184a9b8b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java#L50
>
> https://github.com/bourgesl/jdk-official/blob/d0b770c938be6b5b3a0176148265ef33184a9b8b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java#L303
@bourgesl before I try to integrate these changes: does my response above make sense/satisfy your concern?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21962#discussion_r1887628360
More information about the client-libs-dev
mailing list