Croquet VM issues

Andreas Raab andreas.raab at gmx.de
Fri Mar 17 04:35:15 UTC 2006


Hi Dave -

> Did you mean system attribute 0, which corresponds to argv[0]? But no,
> this would not necessarily return "the" full path to the executable,
> nor does it necessarily return *any* full path to the executable.
> It's just the name that some arbitrary shell program used to
> locate an executable file after having consulted with the $PATH and
> following various symbolic links and so forth. Once the executable
> file was located, the shell did a fork() and exec(), after which
> all was forgotten. As far as I know there is no reliable way to
> determine the actual identity of the file system artifact from
> which the VM was loaded.

That's too bad, but I guess it cannot be helped. Windows has the ability 
to tell you the name of the binary that it loaded (be that an .exe or a 
.dll) and that's what I was really hoping for.

>> * On Mac and Unix, can one read the executable while running Squeak? I 
>> need this to checksum the VM proper.
> 
> Yes, you can do what the shell would have done with argv[0], and you
> can find the executable file that most probably might have been used
> to provide the bytes that got loaded to produce the VM that is currently
> running, and you can read that file once you have located it. But this
> sounds like a rather shakey foundation for a security system.

It's not for security. It's really so that we know whether a VM has ever 
been put to the test or not. In other words when the image starts, it 
would check whether it has been started with an "unknown" VM and if so, 
runs its VM tests and reports to the user if there are any issues. The 
thing is that some of these tests take some time and rather than running 
them anew upon each start of the image I'd like to be able to checksum 
the VM and run them only when we detect that the VM has changed.

Cheers,
   - Andreas



More information about the Vm-dev mailing list