Re: [Rd] unserialize and eager execution

From: Tyler Pirtle <rtp_at_google.com>
Date: Mon, 05 Dec 2011 23:00:39 -0800

On Mon, Dec 5, 2011 at 10:41 PM, Prof Brian Ripley <ripley_at_stats.ox.ac.uk>wrote:

> Take a look at the information on serialization in 'R Internals'. AFAICS
> this is no different from what can happen when loading a saved workspace.
>
>
I'll give that a look, thanks.

>
> On 06/12/2011 05:29, Tyler Pirtle wrote:
>
>> Hi,
>>
>> While debugging a network server I'm developing I noticed something
>> unusual
>> - call to unserialize() resulted in
>> an error about loading a namespace.
>>
>> I was a bit taken back by this - why should unserializing an object cause
>> a
>> namespace lookup?
>> Are there any other side-effects of unserialize() that I should be
>> cautious
>> about? I've been
>> digging through the R_Unserialize() call, I haven't found the
>> loadNamespace
>> bit yet but I
>> assume its in there somewhere.
>>
>> Is there anyway to guard against R eagerly evaluating serialized data
>> (serialize()) being unserialized (unserialize()) ?
>>
>
> Don't unserialize 'eagerly'. Hint: that's what lazy-loading does.
>
>

I don't follow you. Could you elaborate?

Thanks,

T

>
>>
>> Thanks,
>>
>>
>> Tyler
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________**________________
>> R-devel_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-devel<https://stat.ethz.ch/mailman/listinfo/r-devel>
>>
>
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/~ripley/>
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
>

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 06 Dec 2011 - 07:16:23 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 06 Dec 2011 - 14:50:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive