search for: r_warnlength

Displaying 2 results from an estimated 2 matches for "r_warnlength".

2011 Nov 11
1
When collected warnings exceeds 50
...,11 @@ char *tr; int nc; if(!R_CollectWarnings) setupwarnings(); - if( R_CollectWarnings > 49 ) + if( R_CollectWarnings > 49 ) { + endcontext(&cntxt); + inWarning = 0; return; + } SET_VECTOR_ELT(R_Warnings, R_CollectWarnings, call); Rvsnprintf(buf, min(BUFSIZE, R_WarnLength+1), format, ap); if(R_WarnLength < BUFSIZE - 20 && strlen(buf) == R_WarnLength) This fix eliminates the "Invalid read" errors, but I'm unsure if it fixes my application. I'll find out tomorrow. Jeff
2018 May 18
0
Error message truncation
...https://github.com/wch/r-source/blob/a7356bf91b511287aacd3a992abfbcb75b60d93c/src/main/options.c#L546-L552> : if (streql(CHAR(namei), "warning.length")) { int k = asInteger(argi); if (k < 100 || k > 8170) error(_("invalid value for '%s'"), CHAR(namei)); R_WarnLength = k; SET_VECTOR_ELT(value, i, SetOption(tag, argi)); } Further, it appears there's a physical limit on the length of the error message itself which is only slightly larger than 8170: set.seed(1023) NN = 10000L str = paste(sample(letters, NN, TRUE), collapse = '') # should of course...