Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.82k stars 253 forks source link

Potential incompability of RTags with llvm-10 #1407

Open ueberschall opened 3 years ago

ueberschall commented 3 years ago

Describe the bug Upon using code auto-completion of rdm crashes sporadically with the following message Caught signal 11. That is succeeded by a stack trace which is shown below. However that crash only appears when RTags is used with llvm-10. When I used auto-completion in a certain code snippet in my project rdm would immediately crash, when I used llvm-10. But when I used llvm-7 on that same snippet that didn't appear anymore.

To Reproduce

  1. Go to an arbitrary source file in a project indexed with RTags
  2. Type something. As soon as Rtags' auto-completion kicks in
  3. rdm crashes with a Caught signal 11 message and the stack trace shown below

Expected behavior Auto-completion works without provoking crashes of rdm

Screenshots/Backtrace Caught signal 11 /usr/local/bin/rdm(+0x5ed52)[0x5582cc095d52] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f38d4771980] /usr/lib/llvm-10/lib/libclang-10.so.1(+0xfa1c6b)[0x7f38d5ca8c6b] /usr/lib/llvm-10/lib/libclang-10.so.1(+0x6ed237)[0x7f38d53f4237] /usr/lib/llvm-10/lib/libclang-10.so.1(+0x3ee2f4)[0x7f38d50f52f4] /usr/lib/llvm-10/lib/libclang-10.so.1(clang_getSpellingLocation+0x4b)[0x7f38d5105d3b] /usr/local/bin/rdm(_ZN5RTags19DiagnosticsProvider8diagnoseEv+0x2ad)[0x5582cc0a838d] /usr/local/bin/rdm(_ZN16CompletionThread18processDiagnosticsEPKNS_7RequestEP21CXCodeCompleteResultsP21CXTranslationUnitImpl+0x540)[0x5582cc13f500] /usr/local/bin/rdm(_ZN16CompletionThread7processEPNS_7RequestE+0x2de1)[0x5582cc145a31] /usr/local/bin/rdm(_ZN16CompletionThread3runEv+0xba5)[0x5582cc147975] /usr/local/bin/rdm(_ZN6Thread10localStartEPv+0x25)[0x5582cc211e25] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f38d47666db] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f38d3ab471f]

Environment (please complete the following information):

Additional context It works when llvm-7 is used