[Oberon] Oberon Digest, Vol 132, Issue 13 (uninitialized pointers)

"ɹǝzıuıʇnɹɔs ǝoɾ" scruty at users.sourceforge.net
Thu May 14 12:22:26 CEST 2015


Dear Michael,

I remember your earlier post. it's excellent that you found the error
in System.Clear and I hope the correction was incorporated into the PO-distribution.

the oberon system garbage collector wouldn't work if there were tangling or
unitialized pointers. I didn't check for project oberon but the OP2 compiler
did clear all global pointers and for procedures it emitted code to clear
all local pointers up-to a certain number. above this limit, to avoid emited
code becoming too big, it emitted code to clear the whole local stack. heap
allocated space was likewise cleared.


On 14/05/15 12:00, oberon-request at lists.inf.ethz.ch wrote:
> Date: Wed, 13 May 2015 19:47:49 +0200
> From: Michael Schierl <schierlm at gmx.de>
> Subject: Re: [Oberon] FPGA Oberon Article in Xilinx Xcell Journal
> 	(Issue 91)
> To: oberon at lists.inf.ethz.ch
> Message-ID: <55538E45.5020303 at gmx.de>
> Content-Type: text/plain; charset=windows-1252
> 
> Am 13.05.2015 um 15:15 schrieb Srinivas Nayak:
> 
>> > Good to see the article.
>> > Here is the pdf.
>> > www.xilinx.com/publications/archives/xcell/Xcell91.pdf
> Quoted from the article:
> 
> "In fact, system integrity can be violated only by the use of operations
> in the pseudo-module SYSTEM, namely PUT and COPY"
> 
> 
> That's wishful thinking... System integrity can easily be violated by
> accessing uninitialized variables on the stack (it is left as an
> exercise to the reader to abuse this for implementing SYSTEM.PUT for the
> RISC processor in pure Oberon without importing the SYSTEM module). And
> there is no easy way of fixing this that does not impact performance
> (like initializing all variables on the stack), as the Oberon language
> neither has a notion of uninitialized variables, nor of "out" parameters.
> 
> I think the bug in System.Clear that sometimes overwrites some random
> piece of memory due to accessing an uninitialized pointer has not been
> fixed yet in the source published on Project Oberon, either.
> 
> 
> But apart from that, I like the article, too :)
> 
> 
> Regards,
> 
> 
> Michael



More information about the Oberon mailing list