]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42734: Fix crasher bogus_code_obj.py (GH-23939)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 25 Dec 2020 15:03:37 +0000 (17:03 +0200)
committerGitHub <noreply@github.com>
Fri, 25 Dec 2020 15:03:37 +0000 (17:03 +0200)
It did not work because the signature of code object constructor
was changed. Also, it used old format of bytecode (pre-wordcode).

Lib/test/crashers/bogus_code_obj.py

index 198d229491b143548a5b244bac80ac9ba59b21ad..e71b3582cf2d7611801945efd7f9b8bbaa25dda4 100644 (file)
@@ -14,6 +14,6 @@ the user build or load random bytecodes anyway.  Otherwise, this is a
 
 import types
 
-co = types.CodeType(0, 0, 0, 0, 0, b'\x04\x71\x00\x00',
+co = types.CodeType(0, 0, 0, 0, 0, 0, b'\x04\x00\x71\x00',
                     (), (), (), '', '', 1, b'')
 exec(co)