United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7167359 (tz) SEGV on solaris if TZ variable not set
JDK-7167359 : (tz) SEGV on solaris if TZ variable not set

Details
Type:
Bug
Submit Date:
2012-05-08
Status:
Closed
Updated Date:
2014-01-14
Project Name:
JDK
Resolved Date:
2012-05-22
Component:
core-libs
OS:
generic
Sub-Component:
java.util:i18n
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u32
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

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



Hardware and Software, Engineered to Work Together