Mercurial > cpython-lru_cache-weakref
annotate Lib/test/crashers/bogus_code_obj.py @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | b9151c8c79e8 |
| children |
| rev | line source |
|---|---|
|
38952
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
1 """ |
|
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
2 Broken bytecode objects can easily crash the interpreter. |
|
39179
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
3 |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
4 This is not going to be fixed. It is generally agreed that there is no |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
5 point in writing a bytecode verifier and putting it in CPython just for |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
6 this. Moreover, a verifier is bound to accept only a subset of all safe |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
7 bytecodes, so it could lead to unnecessary breakage. |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
8 |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
9 For security purposes, "restricted" interpreters are not going to let |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
10 the user build or load random bytecodes anyway. Otherwise, this is a |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
11 "won't fix" case. |
|
b9151c8c79e8
Document the crashers that will not go away soon as "won't fix",
Armin Rigo <arigo@tunes.org>
parents:
38952
diff
changeset
|
12 |
|
38952
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
13 """ |
|
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
14 |
|
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
15 import types |
|
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
16 |
|
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
17 co = types.CodeType(0, 0, 0, 0, '\x04\x71\x00\x00', (), |
|
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
18 (), (), '', '', 1, '') |
|
58270a690f43
A couple of crashers of the "won't fix" kind.
Armin Rigo <arigo@tunes.org>
parents:
diff
changeset
|
19 exec co |
