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

clang-check crashes when run with no arguments #6

Open
arsenm opened this issue Aug 29, 2012 · 1 comment
Open

clang-check crashes when run with no arguments #6

arsenm opened this issue Aug 29, 2012 · 1 comment

Comments

@arsenm
Copy link

arsenm commented Aug 29, 2012

I'm having trouble getting it to work, but I was noticing that the clang-complete process was never running. Trying to run it resulted in crashes. I'm using a recent git build of clang.

$ gdb --args ./clang-complete
Reading symbols from /home/marsenau/.emacs.d/clang-complete...done.
(gdb) r
Starting program: /home/marsenau/.emacs.d/clang-complete
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff519f700 (LWP 18021)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff519f700 (LWP 18021)]
0x00007ffff65eb7a6 in clang_parseTranslationUnit_Impl (UserData=0x7fffffffda90)
at /home/marsenau/src/llvm/tools/clang/tools/libclang/CIndex.cpp:2571
2571 if (strcmp(command_line_args[I], "-fno-spell-checking") == 0 ||
(gdb) bt
#0 0x00007ffff65eb7a6 in clang_parseTranslationUnit_Impl (UserData=0x7fffffffda90)

at /home/marsenau/src/llvm/tools/clang/tools/libclang/CIndex.cpp:2571

#1 0x00007ffff66ace25 in llvm::CrashRecoveryContext::RunSafely (this=0x7fffffffdad0,

Fn=0x7ffff65eb414 <clang_parseTranslationUnit_Impl(void*)>, UserData=0x7fffffffda90)
at /home/marsenau/src/llvm/lib/Support/CrashRecoveryContext.cpp:308

#2 0x00007ffff66acf2d in RunSafelyOnThread_Dispatch (UserData=0x7fffffffda00)

at /home/marsenau/src/llvm/lib/Support/CrashRecoveryContext.cpp:339

#3 0x00007ffff66cda23 in ExecuteOnThread_Dispatch (Arg=0x7fffffffd970)

at /home/marsenau/src/llvm/lib/Support/Threading.cpp:75

#4 0x00007ffff59b7e9a in start_thread (arg=0x7ffff519f700) at pthread_create.c:308
#5 0x00007ffff5ec34bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6 0x0000000000000000 in ?? ()

(gdb) p command_line_args
$1 = (const char * const *) 0x0

@Golevka
Copy link
Owner

Golevka commented Aug 29, 2012

It is a known issue that clang_complete would crash when being brought up with no command line arguments specified, it expects to accept one sourcefile name plus some other compiler options and it would work well when invoked by the (start-process) call in (launch-completion-proc), maybe it is time to check if the clang_complete executable has been placed to the right path, and if (launch-completion-proc) is properly called and completion-proc refered to a valid process.

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