Skip to content

Switch DeadCodeRemover to be iterative#29

Merged
meck-gd merged 2 commits into
masterfrom
iterative-dead-code-remover
Jun 24, 2026
Merged

Switch DeadCodeRemover to be iterative#29
meck-gd merged 2 commits into
masterfrom
iterative-dead-code-remover

Conversation

@meck-gd

@meck-gd meck-gd commented Jun 24, 2026

Copy link
Copy Markdown

A recursive DeadCodeRemover can be abused by creating huge methods with extremely long expression chain(s), causing a stack overflow due to too many Find() calls. This PR changes the code to be iterative. Sadly it becomes much harder to understand that way, but it's more resilient against obfuscators employing anti-de4dot measures.

@meck-gd meck-gd merged commit e03cb37 into master Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant