Message-ID: <22932.39713.756863.300376@bud.eddelbuettel.com>
Date: 2017-08-16T19:21:05Z
From: Dirk Eddelbuettel
Subject: [Rcpp-devel] grDevices issue with RInside
In-Reply-To: <8ae0ab07-214d-aa12-251b-ac60ec56c839@thon.love>
On 16 August 2017 at 19:50, Jonathon Love wrote:
| hi dirk,
|
| i've got it!
|
| Rst.rhome is assigned here from getenv() (and no copy is made):
|
| https://github.com/eddelbuettel/rinside/blob/d94b999b1f9a5b9a7c1eaefc89abe40ea0d2d4d2/src/RInside.cpp#L164
|
| It makes it's way down inside of R, and is assigned to R_Home:
|
| https://github.com/wch/r-source/blob/3234382b4b4632b114fc8400885300b04e4934a0/src/gnuwin32/system.c#L724
|
| strings returned by getenv() are invalidated by subsequent calls to
| getenv().
|
| the offending code exists in a #ifdef _WIN32 which is why it's windows only.
|
| i'll have a PR for you shortly.
Seeing it now, thanks!
| this has been a bit of an epic.
I can imagine. Windows embedding is simply less well used which is probably
why you were the first to find this particular banane peel ...
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org