Skip to content

Compiler segmentation fault with XMPPFramework #20

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

Open
cevarojetam opened this issue Jan 27, 2015 · 2 comments
Open

Compiler segmentation fault with XMPPFramework #20

cevarojetam opened this issue Jan 27, 2015 · 2 comments
Assignees

Comments

@cevarojetam
Copy link

Very nice tool. I'm trying to use it one of my projects.
The project uses XMPPFramework:
https://github.com/robbiehanson/XMPPFramework

Compilation with flags -mllvm -fla, -mllvm -sub works fine.

but when I add -mllvm -bcf in any form,
e.g. without additional arguments or with -mllvm -boguscf-loop=3 -boguscf-prob=100
the compiler fails and shows following output:

0  clang-3.5                0x000000010ea660e8 llvm::sys::PrintStackTrace(__sFILE*) + 40
1  clang-3.5                0x000000010ea665c4 SignalHandler(int) + 452
2  libsystem_platform.dylib 0x00007fff86ec0f1a _sigtramp + 26
3  clang-3.5                0x000000010e6a73c8 MarkBlocksLiveIn(llvm::BasicBlock*, llvm::SmallPtrSet<llvm::BasicBlock*, 64u>&) + 24
4  clang-3.5                0x000000010e7b2edd llvm::FPPassManager::runOnFunction(llvm::Function&) + 301
5  clang-3.5                0x000000010e7b30cb llvm::FPPassManager::runOnModule(llvm::Module&) + 43
6  clang-3.5                0x000000010e7b358f llvm::legacy::PassManagerImpl::run(llvm::Module&) + 975
7  clang-3.5                0x000000010ee4395e clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 6318
8  clang-3.5                0x000000010ef5a11b clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 523
9  clang-3.5                0x000000010f234864 clang::ParseAST(clang::Sema&, bool, bool) + 468
10 clang-3.5                0x000000010ef58b97 clang::CodeGenAction::ExecuteAction() + 87
11 clang-3.5                0x000000010ec43c5e clang::FrontendAction::Execute() + 62
12 clang-3.5                0x000000010ec17ae3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 867
13 clang-3.5                0x000000010ec79612 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4354
14 clang-3.5                0x000000010deedfbc cc1_main(char const**, char const**, char const*, void*) + 1036
15 clang-3.5                0x000000010deeacb8 main + 1128
16 libdyld.dylib            0x00007fff86bdf5c9 start + 1
Stack dump:

...

<long Program arguments list>

...

1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module '/Users/eldred/work/project/Phonex/ios/app/repo/dependency/xmppFramework/sources/Extensions/XEP-0198/XMPPStreamManagement.m'.
4.  Running pass 'SJLJ Exception Handling preparation' on function '@"\01-[XMPPStreamManagement autoResume]"'
clang-3.5: error: unable to execute command: Segmentation fault: 11
clang-3.5: error: clang frontend command failed due to signal (use -v to see invocation)
Obfuscator- clang version 3.5.0 (tags/RELEASE_350/final) (based on LLVM 3.5.0svn)
Target: arm-apple-darwin14.0.0
Thread model: posix
clang-3.5: note: diagnostic msg: PLEASE submit a bug report to http://o-llvm.org and include the crash backtrace, preprocessed source, and associated run script.
clang-3.5: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.5: note: diagnostic msg: /var/folders/93/qkpkws7j1z3_9dmckflpg62h0000gn/T/XMPPStreamManagement-2a7a3e.m
clang-3.5: note: diagnostic msg: /var/folders/93/qkpkws7j1z3_9dmckflpg62h0000gn/T/XMPPStreamManagement-2a7a3e.cache
clang-3.5: note: diagnostic msg: /var/folders/93/qkpkws7j1z3_9dmckflpg62h0000gn/T/XMPPStreamManagement-2a7a3e.sh
clang-3.5: note: diagnostic msg: 

********************
Command /Users/eldred/work/tool/llvmObfs/build/bin/clang failed with exit code 254

It look like it has a problem with method autoResume in XMPPStreamManagement.m:

- (BOOL)autoResume
{
    XMPPLogTrace();

    __block BOOL result = NO;

    dispatch_block_t block = ^{
        result = autoResume;
    };

    if (dispatch_get_specific(moduleQueueTag))
        block();
    else
        dispatch_sync(moduleQueue, block);

    return result;
}
@pyknite pyknite self-assigned this Jan 27, 2015
@pyknite
Copy link
Collaborator

pyknite commented Jun 30, 2015

Please, can you try again with the new version?

@shichangone
Copy link

got the same problem, with xcode 6.3 and o-llvm3.6.1.
I tried several projects like https://github.com/kif-framework/KIF ,
-mllvm -fla, -mllvm -sub works fine, but -mllvm -bcf allways compile failed and showed save error.

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

3 participants