NDK obfuscation integration, correctness CI, and CI fixes - #1
Merged
Conversation
…link error - tests/run_koto_plugin_smoke.cmake: new — drives plugin_koto_clang_smoke test (compiles example/test.c via clang -fpass-plugin=Kotoamatsukami) - tests/run_koto_opt_smoke.cmake: new — drives plugin_koto_opt_flatten_smoke and plugin_koto_opt_substitution_smoke; copies per-test config to scratch dir so the plugin can find Kotoamatsukami.config via CWD lookup - ci.yml: add -shared-libasan -shared-libubsan to CMAKE_SHARED_LINKER_FLAGS in the sanitized job; static ASAN runtime can't satisfy all symbols when linking a shared library — switching to the shared runtime resolves undefined refs to __asan_report_load* and __ubsan_handle_type_mismatch_v1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NDK clang → .bc → host opt+plugin → obf.bc → NDK clang → .so, bypassing the ABI crash caused by PGO/BOLT differences between NDK's prebuilt clang-17 and any independently-built LLVM 17split-basic-block → bogus-control-flow → substitution → flatten → add-junk-code → indirect-call → indirect-branch; tunable via-DKOTO_PASSEStests/run_koto_plugin_smoke.cmake/run_koto_opt_smoke.cmakewere referenced but missinglibhello_pass_lib.soASAN link error fixed with-shared-libasan -shared-libubsandocs/ndk-obfuscation.md: pipeline diagram, pass benchmark table, per-pass explanations, customisation guideTest plan
build-and-test— standard build + ctest (including newplugin_koto_*smoke tests)build-and-test-sanitized— ASAN/UBSAN build (.solink error should now be resolved)ndk-obfuscation-smoke— NDK 26 build + JNI symbol verificationObfuscation correctness checkstep — RC4 output must match between plain and obfuscated🤖 Generated with Claude Code