Commit graph

553 commits

Author SHA1 Message Date
Eloïse Brocas
6ad9d4b2cd
Merge branch 'master' into dev 2026-05-26 17:16:54 +02:00
Eloïse Brocas
3359033d91
add RERAISE support for python 3.9
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-05-26 16:30:07 +02:00
Michael Hansen
b428976097
Merge pull request #599 from daiche330-png/wip/python311-exception-opcodes-20260405
Handle Python 3.11 exception opcodes in AST builder
2026-04-06 22:58:13 -07:00
daiche330-png
413fbd83c9 Support Python 3.11 exception table try/except flow 2026-04-06 09:30:16 +09:00
daiche330-png
0b1f7cf070 Handle Python 3.11 exception opcodes in AST builder 2026-04-05 22:13:27 +09:00
Eloïse Brocas
81082bb2e8
decompilation: support unpacking for all node types
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:14 +01:00
Eloïse Brocas
bd288c8d9b
list_extend opcode: support calls of function inside list extension
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:14 +01:00
Eloïse Brocas
d35347e569
add support of jump_if_not_exc_match and reraise
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:14 +01:00
Eloïse Brocas
c27bdd1659
create a dedicated object for exception blocks
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:13 +01:00
Eloïse Brocas
31b84750cb
add load_assert_error support
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:13 +01:00
Eloïse Brocas
8006f941c0
add unpack_ex opcode support 2026-03-06 17:03:13 +01:00
Eloïse Brocas
b14e4f7fcc
add DICT_MERGE and CALL_FUNCTION_EX operand support
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:12 +01:00
Eloïse Brocas
b965c94ca6
add MAP_ADD operand support 2026-03-06 17:03:07 +01:00
Eloïse Brocas
b6349bea68
add support of dict comprehension 2025-12-16 14:37:02 +01:00
Eloïse Brocas
271e14f46c
add LIST_TO_TUPLE operand support 2025-12-12 17:48:28 +01:00
Sahil Jain
4ea662d802
Merge branch 'master' into try 2025-08-31 02:40:50 +00:00
Michael Hansen
a05ddec0d8
Merge pull request #564 from whoami730/exceptions
Parse and display exception table
2025-08-30 10:02:14 -07:00
Sahil Jain
d8c6fdf711
Address comments 2025-08-30 20:01:32 +05:30
Michael Hansen
577720302e Add basic protection aginst circular references in pycdas and pycdc.
This fixes the last case of fuzzer errors detected by #572.
2025-08-28 16:42:03 -07:00
Michael Hansen
38799f5cfb Also check EOF in getBuffer() 2025-08-28 15:58:28 -07:00
Michael Hansen
0e7be40367 Add some extra guards against null dereference and empty std::stack pops
Fixes segfault cases of #572
2025-08-28 15:36:35 -07:00
Michael Hansen
ff0c1450b4 Abort immediately when attempting to read past end of stream.
No consumers of readByte() were actually checking for EOF, so they would
all keep re-reading the same byte over and over again, potentially until the
process runs out of memory (ref #572).
2025-08-28 15:14:55 -07:00
Sahil Jain
e8e10f1419
Parse exception table 2025-07-15 22:47:02 +05:30
Sahil Jain
6568907236
Resolve comments on PR 2025-07-14 11:51:40 +05:30
Sahil Jain
8c9e56046c
Support new opcodes 2025-07-13 21:40:59 +05:30
Michael Hansen
a267bfb47f
Merge pull request #561 from whoami730/bug-fix
Fix bug in RAISE_VARARGS
2025-07-04 12:41:02 -07:00
Sahil Jain
8b0ea9450e
Fix RAISE_VARARGS bug 2025-07-04 19:16:04 +05:30
Michael Hansen
7d2039d24e
Merge pull request #557 from whoami730/new-opcodes
Support py 3.12 opcodes: part 2
2025-07-02 07:58:23 -07:00
Michael Hansen
e64ea4bdec
Merge branch 'master' into new-opcodes 2025-07-02 07:56:28 -07:00
Michael Hansen
4badfa6321
Merge pull request #555 from whoami730/master
Support py 3.12 opcodes: part 1
2025-07-02 07:51:36 -07:00
Sahil Jain
6e0089e01c
Update 2025-07-01 22:52:59 +05:30
Sahil Jain
3afcfbc6a7
Fix compilation error 2025-07-01 14:01:05 +05:30
Sahil Jain
aa292c7682
Add newlines 2025-07-01 09:27:07 +05:30
Sahil Jain
5fe61462a2
Support COPY opcde 2025-07-01 09:25:49 +05:30
Sahil Jain
ad5f39db56
Support SLICE opcodes 2025-07-01 09:24:53 +05:30
Sahil Jain
97ec04789d
Add JUMP_BACKWARD + CACHE comments 2025-07-01 09:22:57 +05:30
Sahil Jain
6dae4e801f
Remove COPY opcode 2025-07-01 09:22:57 +05:30
Sahil Jain
040732920b
Add comment 2025-07-01 09:22:57 +05:30
Sahil Jain
a93fd14672
Add new loop tests 2025-07-01 09:22:57 +05:30
Sahil Jain
a4a6a24f3e
Support END_FOR opcode 2025-07-01 09:22:56 +05:30
Michael Hansen
307e0b8fd7 Update to upload-artifact/v4 to fix CI 2025-06-30 19:21:38 -07:00
Michael Hansen
5e1c4037a9
Merge pull request #522 from samyk/report-invalid-opcode
show INVALID opcode properly if < 0
2024-10-13 09:54:24 -07:00
samy kamkar
bbc19885f4 show INVALID opcode properly if < 0 2024-10-12 13:45:16 -07:00
Michael Hansen
dc6ca4ae36 Remove additional specialized opcode that wasn't ordered with the others 2024-08-12 11:39:36 -07:00
Michael Hansen
19f8372358 Remove specialized opcodes.
They are used at runtime, and not written to .pyc / .pyo objects.
2024-08-12 11:24:07 -07:00
Michael Hansen
f37caa8f2a
Test runner refactor (#508)
* Port test runner script to Python.

This allows us to keep the test output in sorted order while still running the
tests in parallel.  It also now defaults to using the number of available CPU
threads for parallel execution, rather than the previously hard-coded default.

* Also port decompyle_test.sh script to python within run_tests.py

* Fix cmake check target for multi-config generators.

Adds testing of release builds on both MSVC and GCC.

* Fix diff comparisons on Windows

* Ubuntu runners don't have ninja by default
2024-08-08 15:55:35 -07:00
Michael Hansen
b939aeb87c Update operand documentation for new opcodes and oparg changes.
Also extends the disassembly oparg decoding for new 3.13 additions.
2024-08-07 15:44:36 -07:00
Alex
75de28decc
Python 3.13 initial support (#497)
* Support for JUMP_BACKWARD

* Initial support for Python 3.13

* Remove opcode from another old PR, not needed in the current one

* Update bytes/python_3_13.cpp

Co-authored-by: Michael Hansen <zrax0111@gmail.com>

* Update bytecode_ops.inl

Co-authored-by: Michael Hansen <zrax0111@gmail.com>

* Update .gitignore

Co-authored-by: Michael Hansen <zrax0111@gmail.com>

* Update bytecode_ops.inl

---------

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2024-08-07 15:39:40 -07:00
Michael Hansen
48d1bfa59f Fix a null dereference.
Fixes #486
2024-08-06 08:21:12 -07:00
Alex
cb32b581ee
Add one more missed flag: CO_ASYNC_GENERATOR (#505)
* Support for JUMP_BACKWARD

* Add missed flag CO_ASYNC_GENERATOR

* Revert "Support for JUMP_BACKWARD"

This reverts commit 81543ece8c.
2024-08-05 12:35:10 -07:00