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 Tue, 30 Jul 2024 07:18:00 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>>>  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?

BTW: in the IR-Framework, we also use `ProcessTools.getProcessId` to generate unique filenames. Would that also be an issue there? So far we have not seen problems with it though...

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

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


More information about the hotspot-compiler-dev mailing list