RFR: JDK-8216529: in case of a crash, javac should print out the parameters passed to it

Vicente Romero vicente.romero at oracle.com
Mon Jan 14 20:03:44 UTC 2019

Hi Liam,

On 1/14/19 2:38 PM, Jonathan Gibbons wrote:
> The intent is the crash report should contain the path of the file, 
> and the file should be in "@-file" format, to make it easier to rerun 
> the compilation using the file with `javac @javac.<date>.args`.   If 
> an error occurs when writing to the file, the info could be written to 
> the console, but note that there could be a huge amount of output, 
> depending how many files are specified on the command-line.

right, what Jon says. I decided not to write to the console because if 
the output is huge, most of it will be lost as it will be trimmed thus 
reducing the usefulness of it.

> -- Jon


> On 1/14/19 11:22 AM, Liam Miller-Cushon wrote:
>> Hi Vicente,
>> This looks useful.
>> Did you consider printing the args to stderr instead of writing them 
>> to a file, maybe as part of msg.bug? If I'm reading the patch 
>> correctly it currently uses a file `javac.<date>.args` in the 
>> directory javac is running from, which users won't necessarily know 
>> about to include in crash reports, and which won't succeed if javac 
>> doesn't have permissions to create files in the working directory.
>> On Mon, Jan 14, 2019 at 10:51 AM Vicente Romero 
>> <vicente.romero at oracle.com <mailto:vicente.romero at oracle.com>> wrote:
>>     Please review the fix for enhancement [1] at [2]. The idea of this
>>     enhancement is to print out to a file the arguments passed to
>>     javac is
>>     there is a fatal error or if a hidden option is passed to the
>>     compiler.
>>     This could be very helpful to reproduce some bugs reported by users.
>>     Thanks,
>>     Vicente
>>     PS, thanks to Jon for offline feedback an suggestions
>>     [1] https://bugs.openjdk.java.net/browse/JDK-8216529
>>     [2] http://cr.openjdk.java.net/~vromero/8216529/webrev.00/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20190114/eb7c674f/attachment.html>

More information about the compiler-dev mailing list