Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

rust 加密字符串编译报错 #122

Open
androiddisk opened this issue Aug 12, 2024 · 0 comments
Open

rust 加密字符串编译报错 #122

androiddisk opened this issue Aug 12, 2024 · 0 comments

Comments

@androiddisk
Copy link

androiddisk commented Aug 12, 2024

感谢作者的付出, 我尝试编译了一个Hikari版本的rust 然后创建了一个hello word的项目 字符串加密编译可以正常运行了 。

但是在尝试其他项目时报错了,实在是看不出来原因

git clone [email protected]:tiann/KernelSU.git && cd KernelSU/
rm -fr userspace/ksud/target/* && time RUST_BACKTRACE=1  cargo rustc --target aarch64-linux-android --release --manifest-path ./userspace/ksud/Cargo.toml -- -Cllvm-args="-enable-strcry" > log.txt 2>&1

报错

Running StringEncryption On _ZN74_$LT$clap_builder..error..format..Escape$u20$as$u20$core..fmt..Display$GT$3fmt17h0f84369fd56a08d1E
Running StringEncryption On _ZN12clap_builder5error6format20format_error_message17h31ff7489318f4e0eE
Running StringEncryption On _ZN12clap_builder5error6format13get_help_flag17h4fd78b32992adefeE
Running StringEncryption On _ZN5alloc5alloc6Global10alloc_impl17h30eec1b34fdad40eE.2467
Running StringEncryption On _ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17haf87346847c26519E
Running StringEncryption On _ZN8clap_lex7RawArgs7next_os17hcd7b043999407594E
Running StringEncryption On _ZN8clap_lex7RawArgs9remaining17h7b8f98645b8bd167E
Running StringEncryption On _ZN8clap_lex9ParsedArg9is_escape17hf248c8023ddf4ecbE
Running StringEncryption On _ZN8clap_lex9ParsedArg8to_value17h736c91c621862591E
Running StringEncryption On _ZN8clap_lex9is_number17h8d5d0fd55e133b64E
Running StringEncryption On _ZN3std3ffi6os_str5OsStr6to_str17hb4232448de2d9d6cE.2496
Running StringEncryption On _ZN8clap_lex9ParsedArg7is_long17hef94eab1cea0d1d3E
Running StringEncryption On _ZN64_$LT$core..str..error..Utf8Error$u20$as$u20$core..fmt..Debug$GT$3fmt17h5d437b7e1ca1804cE.2503
Running StringEncryption On _ZN8clap_lex9ParsedArg8is_short17h9f2b946c3fd0772dE
error: rustc interrupted by SIGSEGV, printing backtrace

/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x25fabd6)[0x7f05378b6bd6]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f0534f86520]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x50cb256)[0x7f053a387256]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x50d7f6d)[0x7f053a393f6d]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2ed0291)[0x7f053818c291]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2ed240c)[0x7f053818e40c]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2ed4d0e)[0x7f0538190d0e]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2ea1938)[0x7f053815d938]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2ea24b5)[0x7f053815e4b5]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2e6b5b6)[0x7f05381275b6]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x52048a8)[0x7f053a4c08a8]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(LLVMRustOptimize+0xdb4)[0x7f0537c35d94]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x288b7ee)[0x7f0537b477ee]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x292fe57)[0x7f0537bebe57]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2941865)[0x7f0537bfd865]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x286bfc9)[0x7f0537b27fc9]
/root/.rustup/toolchains/1.77.2-ollvm/lib/librustc_driver-3f6eb363153aa2cb.so(+0x2879c4e)[0x7f0537b35c4e]
/root/.rustup/toolchains/1.77.2-ollvm/lib/libstd-69e7697c9d8e789e.so(rust_metadata_std_a428c578085206b0+0xa6705)[0x7f0535219705]
/lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7f0534fd8b43]
/lib/x86_64-linux-gnu/libc.so.6(+0x126a00)[0x7f053506aa00]

note: we would appreciate a report at https://github.com/rust-lang/rust
error: could not compile `ksud` (bin "ksud")

Caused by:
  process didn't exit successfully: `/root/.rustup/toolchains/1.77.2-ollvm/bin/rustc --crate-name ksud --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=z -C lto -Cllvm-args=-enable-strcry -C metadata=ae0b8bd7def6ce13 -C extra-filename=-ae0b8bd7def6ce13 --out-dir /root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps --target aarch64-linux-android -C linker=/root/kooapk/rust/ndk/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang -C strip=symbols -L dependency=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps -L dependency=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/release/deps --extern android_properties=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libandroid_properties-4bf7395b965697db.rlib --extern android_logger=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libandroid_logger-224637c51db8a20d.rlib --extern anyhow=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libanyhow-c6ff469c53cdc6a8.rlib --extern chrono=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libchrono-9b3cfaae5ebf47ed.rlib --extern clap=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libclap-5445c0815a9bb626.rlib --extern const_format=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libconst_format-cdcf1600fb922e0c.rlib --extern derive_new=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/release/deps/libderive_new-a922b697cc91a0eb.so --extern encoding_rs=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libencoding_rs-88c7e6b1b51af137.rlib --extern env_logger=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libenv_logger-8e70247aca9522cb.rlib --extern extattr=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libextattr-98d8edfebec3dc38.rlib --extern getopts=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libgetopts-05d4fa23c13bad2e.rlib --extern hole_punch=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libhole_punch-727da2e459f083db.rlib --extern humansize=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libhumansize-cb051c7a6bc99275.rlib --extern is_executable=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libis_executable-1dcf025174c4f0fd.rlib --extern java_properties=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libjava_properties-0fb3c76f6523bf72.rlib --extern jwalk=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libjwalk-39c5b8d80cc0a9a2.rlib --extern libc=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/liblibc-9b3eaf2f408549c6.rlib --extern log=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/liblog-3e49db8c6422e682.rlib --extern loopdev=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libloopdev-257dbafbd0c9e957.rlib --extern nom=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libnom-4f28fb72a8bd6700.rlib --extern procfs=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libprocfs-217a228889f21713.rlib --extern regex=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libregex-e1245b323aea10d0.rlib --extern retry=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libretry-68f9e81a5349b61a.rlib --extern rust_embed=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/librust_embed-8b0874f960302e68.rlib --extern rustix=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/librustix-f6975b0eb03daf02.rlib --extern serde=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libserde-04a4bc1033f218ea.rlib --extern serde_json=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libserde_json-2c755c93ec633249.rlib --extern sha1=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libsha1-faf6cd78369ac558.rlib --extern sha256=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libsha256-abc18e34a1966c1d.rlib --extern tempdir=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libtempdir-e8a1fc8eb53b18bb.rlib --extern which=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libwhich-3559a0c962e179da.rlib --extern zip=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libzip-3749b5896124b4ca.rlib --extern zip_extensions=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/deps/libzip_extensions-674926454c307fc0.rlib -L native=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/build/bzip2-sys-f8cd206db7a36747/out/lib -L native=/root/kooapk/kernel/tmp/KernelSU/userspace/ksud/target/aarch64-linux-android/release/build/zstd-sys-cb8c1cb70a26825c/out` (signal: 11, SIGSEGV: invalid memory reference)

这是完整日志
log.txt

非常感谢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant