Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Issue 444473002: Add lock to prevent race on SysTimeFromTimeStruct (Closed)

Created:
6 years, 4 months ago by bengr
Modified:
6 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

This change preents a race on the 'TZ' environ global variable in libc. This should prevent a crash when base::Time::LocalMidnight calls out to Time::FromExploded() which invokes mktime(), which relies on the timezone, which is initialized when initializing libc (bionic on Android). BUG=390567 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288544

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed comments #

Total comments: 2

Patch Set 3 : Updated comment #

Patch Set 4 : Remove from OS_MACOSX #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -0 lines) Patch
M base/time/time_posix.cc View 1 2 3 5 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
bengr
PTAL
6 years, 4 months ago (2014-08-04 22:38:00 UTC) #1
willchan no longer on Chromium
https://codereview.chromium.org/444473002/diff/1/base/time/time_posix.cc File base/time/time_posix.cc (right): https://codereview.chromium.org/444473002/diff/1/base/time/time_posix.cc#newcode33 base/time/time_posix.cc:33: #if defined(OS_ANDROID) No need for the OS_ANDROID stuff. This ...
6 years, 4 months ago (2014-08-05 23:14:48 UTC) #2
bengr
https://codereview.chromium.org/444473002/diff/1/base/time/time_posix.cc File base/time/time_posix.cc (right): https://codereview.chromium.org/444473002/diff/1/base/time/time_posix.cc#newcode33 base/time/time_posix.cc:33: #if defined(OS_ANDROID) On 2014/08/05 23:14:48, willchan wrote: > No ...
6 years, 4 months ago (2014-08-05 23:54:58 UTC) #3
willchan no longer on Chromium
LGTM, I hope this fixes the bug reports. Seems possible. https://codereview.chromium.org/444473002/diff/40001/base/time/time_posix.cc File base/time/time_posix.cc (right): https://codereview.chromium.org/444473002/diff/40001/base/time/time_posix.cc#newcode34 ...
6 years, 4 months ago (2014-08-06 20:43:24 UTC) #4
bengr
https://codereview.chromium.org/444473002/diff/40001/base/time/time_posix.cc File base/time/time_posix.cc (right): https://codereview.chromium.org/444473002/diff/40001/base/time/time_posix.cc#newcode34 base/time/time_posix.cc:34: // the 'TZ' variable in libc. On 2014/08/06 20:43:24, ...
6 years, 4 months ago (2014-08-07 18:28:30 UTC) #5
bengr
The CQ bit was checked by bengr@chromium.org
6 years, 4 months ago (2014-08-07 18:28:34 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bengr@chromium.org/444473002/60001
6 years, 4 months ago (2014-08-07 18:33:12 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-07 23:21:00 UTC) #8
bengr
On 2014/08/07 23:21:00, I haz the power (commit-bot) wrote: > FYI, CQ is re-trying this ...
6 years, 4 months ago (2014-08-08 00:46:25 UTC) #9
willchan no longer on Chromium
I see, the compile error says the LazyInstance isn't used at all on Mac. Move ...
6 years, 4 months ago (2014-08-08 00:49:38 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-08 01:03:16 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/38871) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/3635) ios_rel_device ...
6 years, 4 months ago (2014-08-08 01:03:17 UTC) #12
bengr
The CQ bit was checked by bengr@chromium.org
6 years, 4 months ago (2014-08-09 00:42:08 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bengr@chromium.org/444473002/80001
6 years, 4 months ago (2014-08-09 00:44:18 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-09 07:32:27 UTC) #15
commit-bot: I haz the power
6 years, 4 months ago (2014-08-09 08:50:48 UTC) #16
Message was sent while issue was closed.
Change committed as 288544

Powered by Google App Engine
This is Rietveld 408576698