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

mingw.thread.h erro #28

Open
zhihuba opened this issue Sep 23, 2022 · 2 comments
Open

mingw.thread.h erro #28

zhihuba opened this issue Sep 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@zhihuba
Copy link

zhihuba commented Sep 23, 2022

#log

ubuntu@ubuntu-virtual-machine:~/CLionProjects/test$ x86_64-w64-mingw32-clang++ checkDebug.cpp -lws2_32 -static -lpsapi -s -w -fpermissive  -Xclang -flto-visibility-public-std -mllvm -fla -mllvm -bcf  -mllvm -sub  -mllvm -gle 
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/local/bin/clang-12 -cc1 -triple x86_64-w64-windows-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name checkDebug.cpp -static-define -mrelocation-model pic -pic-level 2 -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -mms-bitfields -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -nostdsysteminc -nobuiltininc -resource-dir /usr/local/lib/clang/12.0.1 -isystem /usr/local/bin/../lib/clang/12.0.1/include -isystem /usr/x86_64-w64-mingw32/include/../../../usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/include/c++ -isystem /usr/x86_64-w64-mingw32/include/../../../usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/include/c++/x86_64-w64-mingw32 -isystem /usr/x86_64-w64-mingw32/include -w -fdeprecated-macro -fdebug-compilation-dir /home/ubuntu/CLionProjects/test -ferror-limit 19 -fno-use-cxa-atexit -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -exception-model=seh -fcolor-diagnostics -flto-visibility-public-std -mllvm -fla -mllvm -bcf -mllvm -sub -mllvm -gle -faddrsig -o /tmp/checkDebug-848831.o -x c++ checkDebug.cpp
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Unnamed pass: implement Pass::getPassName()' on module 'checkDebug.cpp'.
 #0 0x00007fd688a2a2a1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/../lib/libLLVMSupport.so.12+0x1a62a1)
 #1 0x00007fd688a28064 llvm::sys::RunSignalHandlers() (/usr/local/bin/../lib/libLLVMSupport.so.12+0x1a4064)
 #2 0x00007fd688a281db SignalHandler(int) (/usr/local/bin/../lib/libLLVMSupport.so.12+0x1a41db)
 #3 0x00007fd6884df090 (/lib/x86_64-linux-gnu/libc.so.6+0x43090)
 #4 0x00007fd686b6b6c8 llvm::GlobalsEncryption::runOnModule(llvm::Module&) (/usr/local/bin/../lib/../lib/libLLVMObfuscation.so.12+0x1f6c8)
 #5 0x00007fd688d82a10 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/bin/../lib/libLLVMCore.so.12+0x20ca10)
 #6 0x00007fd68b4eace3 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/../lib/libclangCodeGen.so.12+0xe8ce3)
 #7 0x00007fd68b860979 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/../lib/libclangCodeGen.so.12+0x45e979)
 #8 0x00007fd686a2ff79 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/../lib/../lib/libclangParse.so.12+0x39f79)
 #9 0x00007fd68b85f656 clang::CodeGenAction::ExecuteAction() (/usr/local/bin/../lib/libclangCodeGen.so.12+0x45d656)
#10 0x00007fd68a3263c1 clang::FrontendAction::Execute() (/usr/local/bin/../lib/libclangFrontend.so.12+0x11b3c1)
#11 0x00007fd68a2ba9db clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/../lib/libclangFrontend.so.12+0xaf9db)
#12 0x00007fd68baa4210 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/../lib/libclangFrontendTool.so.12+0x5210)
#13 0x00005625d902dedb cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang-12+0x13edb)
#14 0x00005625d902b6eb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/usr/local/bin/clang-12+0x116eb)
#15 0x00005625d90282ae main (/usr/local/bin/clang-12+0xe2ae)
#16 0x00007fd6884c0083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#17 0x00005625d902b27e _start (/usr/local/bin/clang-12+0x1127e)
clang-12: error: unable to execute command: Segmentation fault (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 12.0.1 (https://github.com/bluesadi/Pluto-Obfuscator a9d03fea2e714ba2bddf2d60adaf87392b08adb5)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-12: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/checkDebug-7d65ca.cpp
clang-12: note: diagnostic msg: /tmp/checkDebug-7d65ca.sh
clang-12: note: diagnostic msg: 

********************
@bluesadi
Copy link
Owner

Hi, thanks for your report. Can you provide the checkDebug.cpp you compiled?

@bluesadi bluesadi added the bug Something isn't working label Sep 24, 2022
@zhihuba
Copy link
Author

zhihuba commented Sep 24, 2022

source code

#include <iostream>
#include "mingw.thread.h"

void myThread() {

    while (1) {
        cout << "check Dbug!" << endl;
        Sleep(1000);
    }
}


int main()
{
    
    thread thr(myThread);
    std::cout << "Hello World!\n";
    
    while (true)
    {
        cout << "good!" << thr.get_id() << endl;

        Sleep(1000 * 2);
    }
    
    thr.join();



}

compile command

  • x86_64-w64-mingw32-clang++ checkDebug.cpp -lws2_32 -static -lpsapi this is good
  • x86_64-w64-mingw32-clang++ checkDebug.cpp -lws2_32 -static -lpsapi -s -mllvm -gle this is error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants