[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Register Based VM's Q.

From: Rhys Weatherley
Subject: Re: [DotGNU]Register Based VM's Q.
Date: Tue, 14 Aug 2001 20:59:59 +1000

Scott Lanham wrote:

> Hi All :-)
> I was wondering why register based vm's lack security?

All examples that I've seen to date use the same
registers for storing both integer and pointer quantities.
When this happens, it becomes possible to put an
arbitrary integer value in a register, and then dereference
it as a pointer.  Presto, chango: we've just accessed
memory that we shouldn't have.

Theoretically, I suppose it would be possible to build
a typed register-based VM.  However, you still have
problems with RTL: it sort of assumes that integers
and pointers are interchangeable.  The "Pmode" register
type is typically #define'd to either "SImode" (int)
or "DImode" (double int).  I don't think anyone has
yet tried defining "Pmode" to be something else.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]