BTW, I'm looking at various possibilities because I'm using the code and data from version "2010l" and I'm hitting following memory error in valgrind log:
==5207== Thread 27: ==5207== Conditional jump or move depends on uninitialised value(s) ==5207== at 0x1B9F988: typesequiv (localtime.c:522) ==5207== by 0x1B9F830: tzload (localtime.c:493) ==5207== by 0x1BA261B: tz_validate (tz.c:1717)
For this kind of Valgrind error, you can get more information if you rerun with valgrind option --track-origins=yes (default being no). This option is only available in recent valgrind versions (>= 3.5 I think).
It should help to find the root cause of the issue.
I tried it and it just points to stack like below: ==21171== Uninitialised value was created by a stack allocation ==21171== at 0x1BA18FE: tzload (tz.c:232) Here is the code at line 232: 229 static int 230 tzload(const char * name, struct state *tz_state, 231 const int doextend, tz_errno_t * errnop) 232 { 233 const char * p = NULL; 234 int i = 0; 235 int stored = 0; 236 ssize_t nread = 0; 237 unzFile zfile = NULL; 238 union { 239 struct tzhead tzhead; 240 char buf[2 * sizeof(struct tzhead) + 241 2 * sizeof (struct state) + 242 4 * TZ_MAX_TIMES]; 243 } u = {0}; Thanks, Ravindra