We're updating the issue view to help you get more done. 

OOM not handled in initStaticTimeZones function in timezones.cpp

Description

While looking into ICU-20367, noticed that OOM is not currently handled in the initStaticTimeZones function in the file timezones.cpp.

https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/timezone.cpp#L303

1 2 3 4 5 6 7 void U_CALLCONV initStaticTimeZones() { // Initialize _GMT independently of other static data; it should // be valid even if we can't load the time zone UDataMemory. ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup); _UNKNOWN_ZONE = new SimpleTimeZone(0, UnicodeString(TRUE, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH)); _GMT = new SimpleTimeZone(0, UnicodeString(TRUE, GMT_ID, GMT_ID_LENGTH)); }

This means that we actually can't rely on falling back to the "unknown" zone in ICU-20367, as that might also have failed due to OOM.

Status

Assignee

Jeff Genovy

Reporter

Jeff Genovy

Labels

Reviewer

Axel Andrejs

Time Needed

None

Start date

None

Components

Fix versions

Priority

major