Issue 1022: use bytes for code objects (original) (raw)

Issue1022

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/45363

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 2022-04-11 14:56 by admin. 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
2022-04-11 14:56:26 admin set github: 45363
2007-10-24 20:02:52 gvanrossum set status: open -> closedresolution: remind -> rejectedmessages: +
2007-09-17 07:56:43 jafo set priority: lowassignee: gvanrossumresolution: remind
2007-09-03 02:37:02 brett.cannon set nosy: + brett.cannonmessages: +
2007-09-02 20:08:29 loewis set keywords: + patch
2007-08-29 20:42:04 gvanrossum set nosy: + gvanrossummessages: +
2007-08-25 17:47:08 nnorwitz create