drt24 / gnuprologjava

GNU Prolog for Java
8 stars 5 forks source link

Jumps limited to 16-bit #12

Closed thetrime closed 8 years ago

thetrime commented 8 years ago

GNU Prolog for Java is 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.