On Fri, 1 Aug 2025 16:16:01 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Fri, 1 Aug 2025 20:19:33 GMT, Chen Liang wrote:
>> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1093:
>>
>>> 1091: * startup. This should not be used to find fields in
>>> non-trusted code.
>>> 1092: * Use the {@link #objectFieldOffset(Field) Field}-accepting
>>
On Fri, 1 Aug 2025 18:46:53 GMT, ExE Boss wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Test update advised by volkan
>
> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1093:
>
>> 1091: * star
On Fri, 1 Aug 2025 18:43:04 GMT, ExE Boss wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Test update advised by volkan
>
> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1108:
>
>> 1106: if
On Fri, 1 Aug 2025 16:16:01 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Fri, 1 Aug 2025 16:16:01 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Mon, 7 Jul 2025 12:05:36 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
>> line 405:
>>
>>> 403: throw new IllegalArgumentException("Must be volatile
>>> type");
>>> 404:
>>> 405: if (Modifier.isS
On Fri, 1 Aug 2025 09:11:07 GMT, Volkan Yazici wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Less specific reasons for IAE
>
> test/jdk/jdk/internal/misc/Unsafe/AddressComputationContractTest.java line 64:
>
>> 62
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accidentally introduce problems.
Chen Liang has updated th
On Thu, 31 Jul 2025 19:04:34 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't a
On Thu, 31 Jul 2025 19:04:34 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't a
On Thu, 31 Jul 2025 19:04:34 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't a
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accidentally introduce problems.
Chen Liang has updated th
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accidentally introduce problems.
Chen Liang has updated th
On Wed, 30 Jul 2025 17:32:57 GMT, John R Rose wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Test to verify observed internal unsafe behaviors
>
> src/hotspot/share/prims/unsafe.cpp line 496:
>
>> 494: Symbol *
On Thu, 3 Jul 2025 18:41:27 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Tue, 24 Jun 2025 18:40:45 GMT, Chen Liang wrote:
>> Don't think anyone is willing to change code here...
>
> That said, the only places that depend on this IAE behavior is the
> AtomicXxxFieldUpdater classes. All other sites pass trusted fields into these
> methods, of course besides the sun
On Thu, 3 Jul 2025 18:41:27 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Tue, 8 Jul 2025 17:59:32 GMT, Alan Bateman wrote:
>> Tracked in 8360541; I think we can implement in a separate patch. Don't know
>> if this is worth backporting to MRs.
>
> Ah yes, I'd forgotten I created this issue to track clarifying the spec.
Sure, the clarification is long past being us
On Mon, 7 Jul 2025 12:06:54 GMT, Chen Liang wrote:
>> @AlanBateman Yeah, I think that makes sense—IIRC it's been that way in
>> practice since forever, but making it clear in documentation seems like the
>> right thing to do.
>
> Tracked in 8360541; I think we can implement in a separate patch.
On Thu, 3 Jul 2025 18:41:27 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Mon, 7 Jul 2025 09:58:15 GMT, Viktor Klang wrote:
>> src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
>> line 407:
>>
>>> 405: if (Modifier.isStatic(modifiers))
>>> 406: throw new IllegalArgumentException("Must not be a
>>> s
On Mon, 7 Jul 2025 09:54:28 GMT, Per Minborg wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Test to verify observed internal unsafe behaviors
>
> src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger
On Thu, 3 Jul 2025 18:41:27 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Mon, 7 Jul 2025 09:56:07 GMT, Alan Bateman wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Test to verify observed internal unsafe behaviors
>
> src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntege
On Thu, 3 Jul 2025 18:41:27 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
On Sun, 6 Jul 2025 18:32:56 GMT, ExE Boss wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Test to verify observed internal unsafe behaviors
>
> test/jdk/jdk/internal/misc/Unsafe/AddressComputationContractTest.java li
On Thu, 3 Jul 2025 18:41:27 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accidentally introduce problems.
Chen Liang has updated th
On Thu, 26 Jun 2025 05:42:24 GMT, ExE Boss wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't acc
On Thu, 3 Jul 2025 13:56:24 GMT, Chen Liang wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't ac
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accidentally introduce problems.
Chen Liang has updated th
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accidentally introduce problems.
Chen Liang has updated th
On Tue, 24 Jun 2025 00:04:54 GMT, Chen Liang wrote:
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accid
On Tue, 24 Jun 2025 00:04:54 GMT, Chen Liang wrote:
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accid
On Tue, 24 Jun 2025 00:04:54 GMT, Chen Liang wrote:
> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
> that AtomicXxxFieldUpdaters are using this mechanism to reject static fields.
> This is not a good practice, but we can at least document this so we don't
> accid
On Tue, 24 Jun 2025 18:34:02 GMT, ExE Boss wrote:
>> Unsafe throws IAE for misusing static vs instance fields, and it's revealed
>> that AtomicXxxFieldUpdaters are using this mechanism to reject static
>> fields. This is not a good practice, but we can at least document this so we
>> don't acc
On Tue, 24 Jun 2025 18:16:29 GMT, Chen Liang wrote:
>> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1070:
>>
>>> 1068: *
>>> 1069: * @throws NullPointerException if the field is {@code null}
>>> 1070: * @throws IllegalArgumentException if the field is static
>>
38 matches
Mail list logo