[Oberon] Safe module unloading (was: Re: Oberon for a C++ user.)

Skulski, Wojciech skulski at pas.rochester.edu
Tue Oct 11 15:47:58 CEST 2016


Andreas:

  it looks like a great development to me. Given the simplicity of your solutions, I wonder if they should not just become a standard part of the "official" 2013 Oberon System. Should they not get backpropagated to Professor NW, with a note that it shows the strength and vitality of the Oberon community which he started?

Wojtek
________________________________________
From: Oberon [oberon-bounces at lists.inf.ethz.ch] on behalf of Andreas Pirklbauer [andreas_pirklbauer at yahoo.com]
Sent: Monday, October 10, 2016 1:21 PM
To: Oberon List
Subject: [Oberon]  Safe module unloading (was: Re: Oberon for a C++ user.)

1. I have uploaded a new version of System.SecureFree that now performs *all* checks (including the check whether there are any global procedure variables in other modules that reference procedures of the module to be unloaded).


2. Writing NIL to all references (and type tags!) when unloading is forced via a /f option is in fact included, but only in the version that is integrated with the garbage collector. The reason is that if it were done outside the existing garbage collector (as is the case in the proof-of-concept version that is currently published), it would immediately break the garbage collector (because it references tags without checking whether they are NIL - see procedure Kernel.Scan for example). If I decide to include “safe module unloading” in the Oberon core, there would also be a /f option and, if selected, all references and tags to unloaded modules would be set to NIL. That’s the holy grail. It is fully implemented. Meanwhile, you can just use System.Free (which does not perform the checks).


Andreas


———————————————————————

On Mon, 10 Oct 2016 12:51:39 +CEAR, Chris wrote:

> On Sat, 8 Oct 2016 19:28:55 +0200, Andreas Pirklbauer wrote:

> > I’d welcome more input on this topic.. all I wanted to show is that
> > it is *doable* (proof of concept) and that the effort is very small.
> >
> >Whether it *should* be done is another question. It remains open.

> Thanks for this great write-up. I think the effort is so small that it
> should be included in the system. This would close the biggest hole in
> the Oberon system.

> I would prefer to improve the forced unload function by writing NIL to
> all references that would close the last hole (I hope) in the system
> for the occurrence of dangling pointers.

> Greetings, chris



More information about the Oberon mailing list