search for: r_tzname

Displaying 5 results from an estimated 5 matches for "r_tzname".

2015 Dec 07
2
inconsistency in POSIXlt
The documentation for the POSIXlt class states '"POSIXlt" objects will often have an attribute "tzone", a character vector of length 3 giving the time zone name from the TZ environment variable and the names of the base time zone and the alternate (daylight-saving) time zone. Sometimes this may just be of length one, giving the time zone
2019 Aug 02
4
Infrequent but steady NULL-pointer caused segfault in as.POSIXlt.POSIXct (R 3.4.4)
...=rho at entry=0xc449d38, useCache=useCache at entry=TRUE) at eval.c:6473 #4 0x00007f1dcb230370 in Rf_eval (e=0x4064b28, rho=rho at entry=0xc449d38) at eval.c:624 (More stack frames follow?) Tracing into src/main/datetime.c:705, it?s a simple string-making code: SET_STRING_ELT(tzone, 1, mkChar(R_tzname[0])); mkChar function is defined in envir.c:3725: 3723 SEXP mkChar(const char *name) 3724 { 3725 size_t len = strlen(name); ? ? gdb shows that the string pointer (name=0x0) mkChar received is NULL, and subsequently strlen(NULL) caused the segfault. But quite contradictorily, gdb shows th...
2019 Aug 04
1
Infrequent but steady NULL-pointer caused segfault in as.POSIXlt.POSIXct (R 3.4.4)
...at eval.c:6473 > > #4 0x00007f1dcb230370 in Rf_eval (e=0x4064b28, > > rho=rho at entry=0xc449d38) at eval.c:624 > > (More stack frames follow?) > > > > Tracing into src/main/datetime.c:705, it?s a simple string-making code: > > SET_STRING_ELT(tzone, 1, mkChar(R_tzname[0])); > > > > mkChar function is defined in envir.c:3725: > > 3723 SEXP mkChar(const char *name) > > 3724 { > > 3725 size_t len = strlen(name); > > ? ? > > > > gdb shows that the string pointer (name=0x0) mkChar received is NULL, > > and...
2015 Dec 07
0
inconsistency in POSIXlt
...being set automatically in the C code as far as I can tell, in particular in the code // localtime may change tzname. if (isgmt) { PROTECT(tzone = mkString(tz)); } else { PROTECT(tzone = allocVector(STRSXP, 3)); SET_STRING_ELT(tzone, 0, mkChar(tz)); SET_STRING_ELT(tzone, 1, mkChar(R_tzname[0])); SET_STRING_ELT(tzone, 2, mkChar(R_tzname[1])); } In the file https://svn.r-project.org/R/trunk/src/main/datetime.c (function do_asPOSIXlt) R_tzname is an extern char pointer. I can't say exactly where it is populated, but the code assumes it will be and that it will take care of w...
2019 Aug 02
0
Infrequent but steady NULL-pointer caused segfault in as.POSIXlt.POSIXct (R 3.4.4)
...seCache at entry=TRUE) > at eval.c:6473 > #4 0x00007f1dcb230370 in Rf_eval (e=0x4064b28, > rho=rho at entry=0xc449d38) at eval.c:624 > (More stack frames follow?) > > Tracing into src/main/datetime.c:705, it?s a simple string-making code: > SET_STRING_ELT(tzone, 1, mkChar(R_tzname[0])); > > mkChar function is defined in envir.c:3725: > 3723 SEXP mkChar(const char *name) > 3724 { > 3725 size_t len = strlen(name); > ? ? > > gdb shows that the string pointer (name=0x0) mkChar received is NULL, > and subsequently strlen(NULL) caused the segfaul...