JDK-7167359 : (tz) SEGV on solaris if TZ variable not set
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6u32
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-05-08
  • Updated: 2014-11-19
  • Resolved: 2012-05-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8
6u33Fixed 7u6Fixed 8 b40Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
SHORT SUMMARY: SEGV on solaris when referencing TZ variable
INDICATORS: Crash seen if no $TZ variable on system (solaris only)
COUNTER INDICATORS:
TRIGGERS: No $TZ variable set
KNOWN WORKAROUND: Mentioned in bugDB report.
PRESENT SINCE: CR 7092679 fix.
HOW TO VERIFY:
NOTES FOR SE: Most likely due to one line where we don't make a null 
check when referencing TZ variable. Will confirm shortly.

http://opengrok.ie.oracle.com:8080/opengrok/xref/jdk7u-dev/jdk/src/solaris/nat
ive/java/util/TimeZone_md.c#649 looks suspicious.

i.e 
    648 #ifdef __solaris__
    649     if (strcmp(tz, "localtime") == 0) {
    650         tz = getSolarisDefaultZoneID();


REGRESSION: yes - since 7092679

Comments
EVALUATION Avoid null reference to tz.
2012-05-09