FW: zic and zoneinfo.zip

Ravindra rsahlot at yahoo.com
Mon Sep 27 09:28:03 UTC 2010


Could someone on the list please help me proceed on valgrind issue?

Thanks in advance.
Ravindra

--- On Sat, 9/25/10, Olson, Arthur David (NIH/NCI) [E] <olsona at dc37a.nci.nih.gov> wrote:

> From: Olson, Arthur David (NIH/NCI) [E] <olsona at dc37a.nci.nih.gov>
> Subject: FW: zic and zoneinfo.zip
> To: "'tz at elsie.nci.nih.gov'" <tz at elsie.nci.nih.gov>
> Cc: "'rsahlot at yahoo.com'" <rsahlot at yahoo.com>
> Date: Saturday, September 25, 2010, 6:11 PM
> I'm forwarding this message from
> Ravindra, who is not on the time zone mailing list. Those of
> you who are on the list, please direct replies
> appropriately.
> 
> (Note that the line numbers below are indeed different from
> those in the 2010l on elsie.nci.nih.gov, and that there's no
> "tz.c" file with a "tz_validate" function in 2010l on
> elsie.nci.nih.gov.)
> 
>            
>     --ado
> 
> -----Original Message-----
> From: Ravindra [mailto:rsahlot at yahoo.com]
> 
> Sent: Saturday, September 25, 2010 8:01
> To: Olson, Arthur David (NIH/NCI) [E]
> Subject: RE: zic and zoneinfo.zip
> 
> Thanks Arthur!
> 
> Is there a place where I get pre-built zic binary for
> Linux?
> 
> I got the doubt because I could build 32-bit zic as well as
> 64-bit zic from source code, and I was not sure whether to
> build zic as a 32-bit binary or 64-bit binary. What I'm
> getting from your response is I can use either version of
> zic and use the generated timezone data files on either
> platform.
> 
> 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)
> 
> Below call is hitting above memory error (line numbers may
> not match with original code because we have integrated it
> in our code):
> 
> 1712         struct
> state    state = {0};
> 1713         time_t 
>                
> now;
> 1714         struct tm 
>              tm;
> 1715
> 1716         time(&now);
> *** 1717         tzload(gmt,
> &state, TRUE, 0);
> ...
> 
> tzload code:
>  ...
>  486         if
> (sp->timecnt > 1) {
>  487             
>    for (i = 1; i < sp->timecnt; ++i)
>  488               
>          if (typesequiv(sp,
> sp->types[i], sp->types[0]) &&
>  489               
>              
>    differ_by_repeat(sp->ats[i],
> sp->ats[0])) {
>  490               
>                
>          sp->goback =
> TRUE;
>  491               
>                
>          break;
>  492               
>              
>    }
> **** 493             
>    for (i = sp->timecnt - 2; i >= 0;
> --i)
>  494               
>          if (typesequiv(sp,
> sp->types[sp->timecnt - 1],
>  495               
>              
>    sp->types[i]) &&
>  496               
>              
>    differ_by_repeat(sp->ats[sp->timecnt
> - 1],
>  497               
>              
>    sp->ats[i])) {
>  498               
>                
>          sp->goahead =
> TRUE;
>  499               
>                
>          break;
>  500             
>    }
>  501         }
>  ...
>  511 static int
>  512 typesequiv(const struct state * const sp, const int a,
> const int b)
>  513 {
>  514         register
> int    result;
>  515
>  516         if (sp == NULL
> ||
>  517             
>    a < 0 || a >= sp->typecnt ||
>  518             
>    b < 0 || b >= sp->typecnt)
>  519               
>          result = FALSE;
>  520         else {
>  521             
>    register const struct ttinfo *  ap =
> &sp->ttis[a];
> *** 522             
>    register const struct ttinfo *  bp =
> &sp->ttis[b];
>  523             
>    result = ap->tt_gmtoff ==
> bp->tt_gmtoff &&
>  524               
>          ap->tt_isdst ==
> bp->tt_isdst &&
>  525               
>          ap->tt_ttisstd ==
> bp->tt_ttisstd &&
>  526               
>          ap->tt_ttisgmt ==
> bp->tt_ttisgmt &&
>  527               
>      
>    strcmp(&sp->chars[ap->tt_abbrind],
>  528               
>      
>    &sp->chars[bp->tt_abbrind]) ==
> 0;
>  529         }
>  530         return result;
>  531 }
> 
> It will be great if you are aware of fix for this or if you
> could help me how to proceed on this. I can explore this
> further but I'm new to this code.
> 
> Thanks in advance,
> Ravindra
> 
> --- On Fri, 9/24/10, Olson, Arthur David (NIH/NCI) [E]
> <olsona at dc37a.nci.nih.gov>
> wrote:
> 
> > From: Olson, Arthur David (NIH/NCI) [E] <olsona at dc37a.nci.nih.gov>
> > Subject: RE: zic and zoneinfo.zip
> > To: "Ravindra" <rsahlot at yahoo.com>
> > Date: Friday, September 24, 2010, 6:40 PM
> > The current version of zic generates,
> > for each time zone, a binary file that includes both
> 32-bit
> > and 64-bit versions of the zone's data; the binary
> files
> > should be usable on both 32- and 64-bit systems.
> > 
> >         --ado
> 
> 
>       
> 


      




More information about the tz mailing list