Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread Peter Levart
On Fri, 11 Feb 2022 13:42:01 GMT, liach wrote: >> ...having suggested that rearrangement, perhaps the right way to do it is to >> enable some VM.isXXX queries themselves to be constant-foldable so that >> other callers too may benefit. Like this: >>

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread liach
On Fri, 11 Feb 2022 08:25:16 GMT, Peter Levart wrote: >> src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java line >> 685: >> >>> 683: instance = c = load(); >>> 684: } >>> 685: return c; >> >> If you do that the "old" way, you loose

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread Peter Levart
On Fri, 11 Feb 2022 08:05:30 GMT, Peter Levart wrote: >> liach has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Make config a pojo, move loading code into config class > >

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread Peter Levart
On Thu, 10 Feb 2022 22:53:56 GMT, liach wrote: >> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), >> by design, duplicate initialization of ReflectionFactory should be safe as >> it performs side-effect-free property read actions, and the suggesting of >> making

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-10 Thread liach
> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), > by design, duplicate initialization of ReflectionFactory should be safe as it > performs side-effect-free property read actions, and the suggesting of making > the `initted` field volatile cannot prevent concurrent