[racket-dev] Separate Compilation Vulnerable to FFI... what to do?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Apr 29 08:10:19 EDT 2014

If you look at this directory:

https://github.com/jeapostrophe/exp/tree/master/fffhase-attack

There's a short "attack" on the promise that different instantiations
of the same module across phases don't share a store.

Running without compiled version
rm -fr compiled
racket -t phase0.rkt --
static: unsafe-global was 0
static: safe-global was 0
dynamic: unsafe-global is 1
dynamic: safe-global is 0

Running with compiled version
raco make phase0.rkt
racket -t phase0.rkt --
static: unsafe-global was 0
static: safe-global was 0
dynamic: unsafe-global is 0
dynamic: safe-global is 0

Should we consider this fine because the effect is "external" (just
like touching a file) or should there be a generalization of the
racket/gui/base rule that the module can't be instantiated multiple
times?

A bit of a grep doesn't lead to any easy place where that is
implemented.... it seems like that feature can only be implemented
with a restricted form of the attack itself, so you can observe that
the instantiation already happened.

Jay

-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.