Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v11]

2025-04-18 Thread Timofei Pushkin
e same name making > such solution possible. Timofei Pushkin has updated the pull request incrementally with two additional commits since the last revision: - Make RegUnregSuperTest AOTClassLinking-compatible - Extend overshadowing explanation comments - Changes: - al

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-17 Thread Timofei Pushkin
On Thu, 17 Apr 2025 05:45:50 GMT, Calvin Cheung wrote: >> Timofei Pushkin has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Empty commit to make GH update the PR >> - Merge remot

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-17 Thread Timofei Pushkin
On Wed, 16 Apr 2025 21:52:46 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Empty commit to make GH update the PR >> - Merge remote-track

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-16 Thread Timofei Pushkin
On Wed, 16 Apr 2025 14:34:25 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumpin

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-16 Thread Timofei Pushkin
e same name making > such solution possible. Timofei Pushkin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Empty commit to make GH update the PR - Merge remote-tracking branch 'openjdk-jdk/master'

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v9]

2025-04-16 Thread Timofei Pushkin
e same name making > such solution possible. Timofei Pushkin has updated the pull request incrementally with two additional commits since the last revision: - Implement super overshadowing warning - Omit Source classes from archive - Changes: - all: https://git.

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v8]

2025-04-16 Thread Timofei Pushkin
On Tue, 15 Apr 2025 17:59:41 GMT, Calvin Cheung wrote: >> Timofei Pushkin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unused imports > > src/java.base/share/classes/jdk/internal/mis

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v6]

2025-04-15 Thread Timofei Pushkin
On Tue, 15 Apr 2025 00:58:19 GMT, Ioi Lam wrote: >> This case will work, I've added the test, however I found another case which >> won't be handled correctly, neither before nor after this change. >> >> This is the case you've suggested, it works fine both before and after the >> change. >>

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v6]

2025-04-14 Thread Timofei Pushkin
On Thu, 10 Apr 2025 16:04:59 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove findClass, extend explanation comments > > test/hotspot/jtreg/r

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v7]

2025-04-14 Thread Timofei Pushkin
e same name making > such solution possible. Timofei Pushkin has updated the pull request incrementally with two additional commits since the last revision: - Fix indentation - Extend ClassFromClasspath test - Changes: - all: https://git.openjdk.org/jdk/pull/24223/files

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-14 Thread Timofei Pushkin
On Thu, 10 Apr 2025 16:01:20 GMT, Ioi Lam wrote: >> Currently we have some restrictions if`-Djava.system.class.loader=` is >> specified >> >> - we disable full module graph archiving: >> https://github.com/openjdk/jdk/blob/0e223f1456c14efdb423595bee3444d5e26db7c6/src/hotspot/share/cds/cdsConfi

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v8]

2025-04-14 Thread Timofei Pushkin
e same name making > such solution possible. Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision: Remove unused imports - Changes: - all: https://git.openjdk.org/jdk/pull/24223/files - new: https://git.openjdk.org/j

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

2025-04-10 Thread Timofei Pushkin
On Mon, 7 Apr 2025 16:15:47 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Don't use URLClassPath > > src/java.base/share/classes/jdk/internal/misc/CDS.java lin

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v6]

2025-04-09 Thread Timofei Pushkin
e same name making > such solution possible. Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision: Remove findClass, extend explanation comments - Changes: - all: https://git.openjdk.org/jdk/pull/24223/files - ne

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-09 Thread Timofei Pushkin
On Wed, 9 Apr 2025 09:03:41 GMT, Timofei Pushkin wrote: >> src/java.base/share/classes/jdk/internal/misc/CDS.java line 438: >> >>> 436: // class loader. Thus it is safe to delegate their loading >>> to system class loader >>> 437:

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-09 Thread Timofei Pushkin
On Tue, 8 Apr 2025 17:36:57 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unnecessary scoping > > src/java.base/share/classes/jdk/internal/mis

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-08 Thread Timofei Pushkin
e same name making > such solution possible. Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision: Remove unnecessary scoping - Changes: - all: https://git.openjdk.org/jdk/pull/24223/files - new: https://git.open

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

2025-04-08 Thread Timofei Pushkin
On Mon, 7 Apr 2025 16:00:27 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Don't use URLClassPath > > src/hotspot/share/cds/classListParser.cpp l

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

2025-04-07 Thread Timofei Pushkin
On Fri, 4 Apr 2025 21:11:52 GMT, Ioi Lam wrote: >> All the opening and reading is handled by `URLClassPath` (it's not just >> JARs, can also be directories). I used only `defineClass` from >> `URLClassLoader` to minimize the behavior difference with the old code — >> besides defining the class

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

2025-04-07 Thread Timofei Pushkin
e same name making > such solution possible. > > Implementation note: `URLClassLoader` does not allow selecting a specific URL > to load a specific class — I used reflection to override a private part of > `URLClassLoader` responsible for URL selection while being able to use the

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v3]

2025-04-04 Thread Timofei Pushkin
On Fri, 4 Apr 2025 06:15:27 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Make getResource concurrent-friendly >> - Don't use URLClassLoader > > src/

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v3]

2025-04-04 Thread Timofei Pushkin
e same name making > such solution possible. > > Implementation note: `URLClassLoader` does not allow selecting a specific URL > to load a specific class — I used reflection to override a private part of > `URLClassLoader` responsible for URL selection while being able to use the

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v3]

2025-04-04 Thread Timofei Pushkin
On Fri, 4 Apr 2025 05:58:47 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Make getResource concurrent-friendly >> - Don't use URLClassLoader > > src/

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v2]

2025-04-04 Thread Timofei Pushkin
e same name making > such solution possible. > > Implementation note: `URLClassLoader` does not allow selecting a specific URL > to load a specific class — I used reflection to override a private part of > `URLClassLoader` responsible for URL selection while being able to use the

RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive

2025-03-25 Thread Timofei Pushkin
If a base class is package-private then its subclasses should have the same package name and defining class loader, otherwise `IllegalAccessError` is thrown when linking a subclass. Currently when dumping a static archive separate `URLClassLoader`s are used for each unregistered classes' source.