Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用插件编译时报错:(exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) #3

Closed
JT0cZ7 opened this issue Jul 24, 2024 · 2 comments

Comments

@JT0cZ7
Copy link

JT0cZ7 commented Jul 24, 2024

大佬您好!

我在使用rustup工具链为nightly-2023-10-20-x86_64-pc-windows-msvc - rustc 1.75.0-nightly (4578435e1 2023-10-19)编译时,如果不用插件可以正常编译成功,当使用插件并添加Cpasses后则编译报错,详情如下:

Caused by:
process didn't exit successfully: C:\Users\xxx\.rustup\toolchains\nightly-2023-10-20-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name project --edition=2021 src\main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=119 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -Zllvm-plugins=C:\Users\xxx\Pictures\JoJoLoader-main\JoJoLoader-main\LLVMObfuscationx-msvc.dll -Cpasses=irobf(irobf-indbr) -C metadata=72b839cbfeef5f55 --out-dir C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\xxx\Downloads\JoJo64\target\release\deps --extern base64=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libbase64-45fcb47cdfea030c.rlib --extern dirs=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libdirs-d33245e02d06c7f3.rlib --extern libc=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\liblibc-bc3f5a74f899ba90.rlib --extern libloading=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\liblibloading-8df210f5cb59c881.rlib --extern rand=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\librand-754ac7b1fe1df0de.rlib --extern sysinfo=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libsysinfo-ae5e8de916bd7f10.rlib --extern tempfile=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libtempfile-037de3ec19a22053.rlib --extern time=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libtime-dbffbe8f5b57e368.rlib --extern uuid=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libuuid-184989a5be9ad00c.rlib --extern winapi=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libwinapi-fca238a882ec14f9.rlib --extern windows_sys=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libwindows_sys-a2618a879aa155d8.rlib --extern winreg=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\deps\libwinreg-d307383aaced6fd6.rlib -Awarnings -C link-arg=C:\Users\xxx\Downloads\JoJo64\target\x86_64-pc-windows-msvc\release\build\project-7f77683e1c8e1e97\out/icon.lib -L native=C:\Users\xxx\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.52.5\lib -L native=C:\Users\xxx\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.48.5\lib (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

编译命令:
rustup default nightly-2023-10-20-x86_64-pc-windows-msvc
cargo rustc --target x86_64-pc-windows-msvc --release -- -Zllvm-plugins="C:\Users\xxx\LLVMObfuscationx-msvc.dll" -Cpasses="irobf(irobf-indbr,irobf-icall,irobf-indgv,irobf-cff,irobf-cse)"

希望大佬能帮助解决,万分感谢!

@0xlane
Copy link
Owner

0xlane commented Jul 25, 2024

我试了下,应该是版本的问题,安装了和你一样版本的工具链也是这个报错。

我当时编译仓库dll的环境是llvm 1.18.5,工具链版本为
nightly-x86_64-pc-windows-msvc (default)
rustc 1.81.0-nightly (4bc39f028 2024-06-26)

我估计是至少需要使用和我这个版本(nightly-2024-06-26)相近的才行,因为工具链里内置的llvm版本是不一样的。

好像在另外一个机器测试过1.79应该是也可以,你试试更新版本的方式。

@0xlane
Copy link
Owner

0xlane commented Jul 25, 2024

如果环境要求必须使用旧版本,那你应该需要按readme重新编译一下

@0xlane 0xlane closed this as completed Aug 5, 2024
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

No branches or pull requests

2 participants