info-gnuprologjava
[Top][All Lists]
Advanced

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

Re: [Info-gnuprologjava] 16-bit VM pointers


From: Daniel Thomas
Subject: Re: [Info-gnuprologjava] 16-bit VM pointers
Date: Wed, 26 Nov 2014 09:21:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 25/11/14 19:19, Matt Lilley wrote:
> Hi,
> 
> I'm not sure if this is the right address; if not, can someone direct me to 
> the right one?
> 
> I noticed today while trying to debug some code that GNU Prolog for Java 
> seems to be limited to 16-bit pointers in the VM. For example, the 
> retry-me-else opcode has a maximum argument of 65535. If you create a 
> predicate with a lot of complicated clauses, this can easily be exhausted, 
> and you end up with pointer truncation, and ultimately undefined behaviour.
> 
> Is there a good reason we cannot extend this to at least 32 bits? I'm happy 
> to write the patch if someone has the time to review it. At the *very* least 
> we should check in InterpretedByteCode that the retryPosition is less than 
> the maximum jump distance and raise an exception if it is.
> 
> Regards,
> Matt

Hello Matt,

I would be happy to review such a patch particularly if it came with
some good test cases.

Regards,

Daniel



reply via email to

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