classification
Title: use bytes for code objects
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: brett.cannon, gvanrossum, nnorwitz
Priority: low Keywords: patch

Created on 2007-08-25 17:47 by nnorwitz, last changed 2007-10-24 20:02 by gvanrossum. This issue is now closed.

Files
File name Uploaded Description Edit
code-bytes.patch nnorwitz, 2007-08-25 17:47
Messages (4)
msg55290 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-08-25 17:47
This patch has a hack to read in marshaled code objects.  Bytes can't be 
marshaled currently (they are stored as strings).  So when reading a 
marshaled code object, the hack converts them to bytes.

All tests except test_modulefinder pass.

The issue is that since bytes are mutable, they aren't suitable for code 
objects since a user could change them at any time.
msg55436 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-08-29 20:42
I'll defer thinking about this until post-a1.
msg55597 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2007-09-03 02:37
I have security/stability issues with code objects having mutable
bytecode.  This would allow someone to possibly crash the interpreter
with crappy bytecode.  I also have a worry that someone might come up
with some clever way of causing different code to execute through
manipulating what LOAD_GLOBALS or STORE_GLOBALS accesses/sets.
msg56727 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-24 20:02
We won't be doing it this way.
History
Date User Action Args
2007-10-24 20:02:52gvanrossumsetstatus: open -> closed
resolution: remind -> rejected
messages: + msg56727
2007-09-17 07:56:43jafosetpriority: low
assignee: gvanrossum
resolution: remind
2007-09-03 02:37:02brett.cannonsetnosy: + brett.cannon
messages: + msg55597
2007-09-02 20:08:29loewissetkeywords: + patch
2007-08-29 20:42:04gvanrossumsetnosy: + gvanrossum
messages: + msg55436
2007-08-25 17:47:08nnorwitzcreate