llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Assertion failure in test_localtime_r() if timezone is not EDT

Open BalaRishi-AMD opened this issue 10 years ago • 1 comments

Bugzilla Link 28914
Resolution WORKSFORME
Resolved on Jun 11, 2018 20:32
Version 3.8
OS Linux
CC @vitalybuka

Extended Description

If the timezone of the system is not EDT, facing the below error:

custom.cc.tmp: /home/amd/llvm/projects/compiler-rt/test/dfsan/custom.cc:555: void test_localtime_r(): Assertion `t1.tm_min == 56' failed.

void test_localtime_r() { time_t t0 = 1384800998; struct tm t1; dfsan_set_label(i_label, &t0, sizeof(t0)); struct tm* ret = localtime_r(&t0, &t1); assert(ret == &t1); assert(t1.tm_min == 56); // <=== ASSERT_LABEL(t1.tm_mon, i_label); }

BalaRishi-AMD avatar Aug 09 '16 15:08 BalaRishi-AMD

Can reproduce, and system is not EDT.

vitalybuka avatar Jun 12 '18 03:06 vitalybuka