From |g@ut|er @end|ng |rom gm@||@com  Sat Nov 30 20:04:25 2019
From: |g@ut|er @end|ng |rom gm@||@com (Laurent Gautier)
Date: Sat, 30 Nov 2019 14:04:25 -0500
Subject: [Rd] Inconsistent behavior for the C AP's R_ParseVector() ?
Message-ID: <CA+JCgN0vZ8O1ekweEgPqcH202PKU2dfMW959eF=Q2S8K1OSKeQ@mail.gmail.com>

Hi,

The behavior of
```
SEXP R_ParseVector(SEXP, int, ParseStatus *, SEXP);
```
defined in `src/include/R_ext/Parse.h` appears to be inconsistent depending
on the string to be parsed.

Trying to parse a string such as `"list(''=1+"` sets the
`ParseStatus` to incomplete parsing error but trying to parse
`"list(''=123"` will result in R sending a message to the console
(followed but a crash):

```
R[write to console]: Error: attempt to use zero-length variable
nameR[write to console]: Fatal error: unable to initialize the JIT***
stack smashing detected ***: <unknown> terminated
```

Is there a reason for the difference in behavior, and is there a workaround ?

Thanks,


Laurent

	[[alternative HTML version deleted]]



[Rd] Inconsistent behavior for the C AP's R_ParseVector() ?
Laurent Gautier