Issue2533

classification
Title: Opcode.java is outdated -> breaks PyBytecode.interpret
Type: Severity: normal
Components: Core Versions: Jython 2.7
Milestone: Jython 2.7.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: stefan.richthofer Nosy List: stefan.richthofer
Priority: high Keywords:

Created on 2016-11-24.06:03:31 by stefan.richthofer, last changed 2017-02-27.04:50:50 by zyasoft.

Messages
msg10990 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2016-11-24.06:03:30
The opcodes in Opcode.java are still at the stage of Python 2.5.2. This currently breaks PyBytecode.interpret and thus the whole pycimport mechanism. As a quick improvement I would fix the opcodes such that Python 2.7 compatibility is restored.
However just fixing the opcodes is probably not enough, because new semantics must be considered in PyBytecode.interpret. Fixing Opcodes.java would still be an improvement, because currently even trivial things like attribute-lookup fail.
msg10991 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2016-11-25.16:50:59
Fixed as of commit 7986c893c14bd4fcc59da5af6e1aaa28204e1188.
Review is recommended, also more testing.

Now PyBytecode supports bytecode according to magic number 62211 (CPython 2.7).

Also: pycimport.py now checks for right bytecode-version and refuses to load unsupported bytecode; previously this potentially yielded undefined behavior (however usually ending up with NullpointerException or ArrayIndexOutOfBoundException or so).
History
Date User Action Args
2017-02-27 04:50:50zyasoftsetstatus: pending -> closed
2016-11-25 16:51:00stefan.richthofersetstatus: open -> pending
resolution: fixed
messages: + msg10991
milestone: Jython 2.7.1
2016-11-24 06:03:31stefan.richthofercreate