Re: [Rd] Random behavior of mclapply

2018-10-22 Thread Thibault Vatter
Hi Tomas, Thanks a lot for the explanation and the changes. The update in the documentation is especially helpful. Best, Thibault On Thu, Oct 18, 2018 at 10:48 AM Tomas Kalibera wrote: > > Hi Thibault, > > mclapply has been designed to signal an error in two ways. User code > errors are ret

[Rd] v3 serialization of compact_intseq altrep should write modified data

2018-10-22 Thread Michael Sannella via R-devel
Experimenting with altrep objects and v3 serialization, I discovered a possible bug. Calling DATAPTR on a compact_intseq object returns a pointer to the expanded integer sequence in memory. If you modify this data, the object values appear to be changed. However, if the compact_intseq object is

Re: [Rd] v3 serialization of compact_intseq altrep should write modified data

2018-10-22 Thread Tierney, Luke
Try this C code: SEXP set_intseq_data(SEXP x) { if (MAYBE_SHARED(x)) error("Oops, not supposed to do this!"); void* ptr = DATAPTR(x); ((int*)ptr)[3] = 1234; return R_NilValue; } Lots of things will break if you modify objects that have been marked as immutable (and hen