RFR: 8337221: CompileFramework: test library to conveniently compile java and jasm sources for fuzzing

Emanuel Peter epeter at openjdk.org
Thu Sep 12 15:57:28 UTC 2024


On Mon, 29 Jul 2024 12:49:55 GMT, Evgeny Nikitin <enikitin at openjdk.org> wrote:

>> I want to separate exceptions where the user is responsible, and internal exceptions that should never happen (otherwise there is a bug in the CompileFramework).
>
> Aren't they in the same package (and therefore the imports are redundant)?

Correct, fixing that. Thanks!

>> But what exactly could go wrong here? The "compile" method is to be called in a single-threaded way. This thread should have a unique `ProcessTools.getProcessId`, right? So no two processes should be generating the same directory.
>
>>  Is that possible with File.createTempFile as well?
> Yes. 'Directory', the argument is the path to contain the newly created temp file;
> 
>> But what exactly could go wrong here? The "compile" method is to be called in a single-threaded way.
> 1. Well, I personally don't like imposing such a heavy (single-threaded-only) requirement while we can easily make it mt-safe; It's a **universal** compiling FW, after all.
> 2. Among the most obvious users of the FW are automated test generators, the likes of JavaFuzzer and JITTester. The former is multi-threaded (and is loved in the industry for that). The latter presents serious problems (huge run times) because of its single-threaded nature;

@lepestock Why exactly is my solution not multi-threading safe?
Does your solution with `File.createTempFile` allow (easy) extraction of the generated files when there is a failure? Where could those files be found?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20184#discussion_r1696452990
PR Review Comment: https://git.openjdk.org/jdk/pull/20184#discussion_r1696443244


More information about the hotspot-compiler-dev mailing list