RFR: 8271003: hs_err improvement: handle CLASSPATH env setting longer than O_BUFLEN

Calvin Cheung ccheung at openjdk.java.net
Mon Aug 2 17:34:38 UTC 2021


On Mon, 2 Aug 2021 02:33:33 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Please review this small enhancement for addressing the problem of the CLASSPATH env variable setting being truncated in a hs err log.
>> 
>> For printing a char string, it doesn't need to go through `do_vsnprintf()` which does the truncation based on the input buffer length. The change is local to the code path pertaining to hs err log.
>> 
>> Testing:
>> 
>> - [x] tiers 1, 2 (including the new test)
>
> test/hotspot/jtreg/runtime/ErrorHandling/ClassPathEnvVar.java line 53:
> 
>> 51:     private static final String end_path = "end-path";
>> 52: 
>> 53:     private static class Crasher {
> 
> Can't you just use one of the existing -XX:ErrorHandlerTest=n values to trigger the crash?

Yes, using -XX:ErrorHandlerTest=1 should trigger the crash. I was just reusing the Crasher from another test case.

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

PR: https://git.openjdk.java.net/jdk/pull/4947


More information about the hotspot-runtime-dev mailing list