RFR: 8292202: modules_do is called without Module_lock [v2]

Coleen Phillimore coleenp at openjdk.org
Wed Sep 21 16:41:25 UTC 2022


On Thu, 15 Sep 2022 21:43:51 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Please review this fix which involves:
>> 
>> - acquire the `Module_lock` before calling `modules_do`;
>> - move the call to `ClassLoader::setup_module_search_path `out of `do_module`;
>> - save the module paths in a `GrowableArray` in `do_module` for calling `ClassLoader::setup_module_search_path`.
>> 
>> Passed tiers 1 - 3 testing.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   get rid of the _total_count field

Looks great.  Thanks for fixing this.  Can you add in moduleEntry.cpp in both modules_do function an assert that the Module_lock is held.  The other modules_do has the assert at a higher level so nothing will trigger it.  The modules_do() that this calls now will not fail the assert.

-------------

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10291


More information about the hotspot-runtime-dev mailing list