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.

classification
Title: importlib doesn't handle valid marshalled data with invalid semantics
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: benjamin.peterson, brett.cannon
Priority: normal Keywords:

Created on 2010-06-28 00:28 by benjamin.peterson, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg108810 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-06-28 00:28
get_code() returns marshal.loads(self.get_data()). If get_data() returns valid marhsal data that is not a code object, get_code() will explode when it tries to exec it with a TypeError not the expected ValueError.
msg109033 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-07-01 06:28
Turns out that an ImportError should be raised when a bytecode object contains a non-code object. My next patch which makes SourceLoader the primary loader will have the fix.
msg109258 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-07-04 19:15
This was fixed in r82523.
History
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53342
2010-07-04 19:15:51brett.cannonsetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg109258
2010-07-01 06:28:20brett.cannonsetversions: + Python 3.2
resolution: accepted
messages: + msg109033

components: + Library (Lib)
type: behavior
2010-06-28 00:28:18benjamin.petersoncreate