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

macOS m1 上成功编译,但是 clang 加载插件运行就crash #9

Open
BRAlNDead opened this issue Sep 8, 2024 · 0 comments
Open

Comments

@BRAlNDead
Copy link

平台:macOS m1

/Volumes/xcode/aosp/out_ndk25/stage2-install/bin/clang++ \ 一 00:17
-Wall -std=c++14 -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk
-fpass-plugin=../Obfuscation/build/libSsageObfuscator.so
-mllvm --rewrite-map-file=symbols_obf.yaml
main.cpp -o main
Version is 25
Made By SsageParuders
PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /Volumes/xcode/aosp/out_ndk25/stage2-install/bin/clang-14 -cc1 -triple arm64-apple-macosx14.0.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -funwind-tables=2 -target-sdk-version=14.5 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +fp-armv8 -target-feature +neon -target-feature +crc -target-feature +crypto -target-feature +dotprod -target-feature +fp16fml -target-feature +ras -target-feature +lse -target-feature +rdm -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=lldb -target-linker-version 14.0.7 -fcoverage-compilation-dir=/Users/xiaowu/Xbuild/SsagePass/Demo -resource-dir /Volumes/xcode/aosp/out_ndk25/stage2-install/lib64/clang/14.0.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -stdlib=libc++ -internal-isystem /Volumes/xcode/aosp/out_ndk25/stage2-install/bin/../include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/local/include -internal-isystem /Volumes/xcode/aosp/out_ndk25/stage2-install/lib64/clang/14.0.7/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include -Wall -std=c++14 -fdeprecated-macro -fdebug-compilation-dir=/Users/xiaowu/Xbuild/SsagePass/Demo -ferror-limit 19 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcolor-diagnostics -fpass-plugin=../Obfuscation/build/libSsageObfuscator.so -mllvm --rewrite-map-file=symbols_obf.yaml -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /var/folders/df/d3hzjk413wb01_zwtxcn9p880000gn/T/main-bea387.o -x c++ main.cpp

  1. parser at end of file
  2. Optimizer
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it):
    0 clang-14 0x000000010341ca14 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
    1 clang-14 0x000000010341bc20 llvm::sys::RunSignalHandlers() + 112
    2 clang-14 0x000000010341d034 SignalHandler(int) + 156
    3 libsystem_platform.dylib 0x00000001908de584 _sigtramp + 56
    4 clang-14 0x0000000102e79a8c llvm::AnalysisManagerllvm::Module::getResultImpl(llvm::AnalysisKey*, llvm::Module&) + 248
    5 libLLVM.dylib 0x00000001109ae49c llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) + 96
    6 libSsageObfuscator.so 0x000000010885f250 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) + 52
    7 clang-14 0x0000000102e76590 llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) + 332
    8 clang-14 0x0000000103646a0c clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_deletellvm::raw_pwrite_stream >) + 2088
    9 clang-14 0x0000000103863604 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 988
    10 clang-14 0x0000000104640358 clang::ParseAST(clang::Sema&, bool, bool) + 412
    11 clang-14 0x0000000103a6d49c clang::FrontendAction::Execute() + 60
    12 clang-14 0x0000000103a13bb0 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 204
    13 clang-14 0x0000000103ab5710 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 352
    14 clang-14 0x000000010229742c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 896
    15 clang-14 0x00000001022951ac ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 408
    16 clang-14 0x0000000102294f18 main + 4604
    17 dyld 0x0000000190523154 start + 2476
    clang-14: error: unable to execute command: Segmentation fault: 11
    clang-14: error: clang frontend command failed due to signal (use -v to see invocation)
    Android (dev, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
    Target: arm64-apple-darwin23.6.0
    Thread model: posix
    InstalledDir: /Volumes/xcode/aosp/out_ndk25/stage2-install/bin
    clang-14: note: diagnostic msg:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-14: note: diagnostic msg: /var/folders/df/d3hzjk413wb01_zwtxcn9p880000gn/T/main-d4a539.cpp
clang-14: note: diagnostic msg: /var/folders/df/d3hzjk413wb01_zwtxcn9p880000gn/T/main-d4a539.sh
clang-14: note: diagnostic msg: Crash backtrace is located in
clang-14: note: diagnostic msg: /Users/xiaowu/Library/Logs/DiagnosticReports/clang-14__.crash
clang-14: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang-14: note: diagnostic msg:

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

1 participant