A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.

Overview
MELPA MELPA
rtags
MELPA
rtags-xref ac-rtags company-rtags flycheck-rtags helm-rtags ivy-rtags
MELPA MELPA MELPA MELPA MELPA MELPA

Introduction

RTags is a client/server application that indexes C/C++ code and keeps a persistent file-based database of references, declarations, definitions, symbolnames etc. There’s also limited support for ObjC/ObjC++. It allows you to find symbols by name (including nested class and namespace scope). Most importantly we give you proper follow-symbol and find-references support. We also have neat little things like rename-symbol, integration with clang’s “fixits” (https://clang.llvm.org/diagnostics.html). We also integrate with flymake using clang’s vastly superior errors and warnings. Since RTags constantly will reindex “dirty” files you get live updates of compiler errors and warnings. Since we already know how to compile your sources we have a way to quickly bring up the preprocessed output of the current source file in a buffer.

While existing taggers like gnu global, cscope, etags, ctags etc do a decent job for C they often fall a little bit short for C++. With its incredible lexical complexity, parsing C++ is an incredibly hard task and we make no bones about the fact that the only reason we are able to improve on the current tools is because of clang (https://clang.llvm.org/). RTags is named RTags in recognition of Roberto Raggi on whose C++ parser we intended to base this project but he assured us clang was the way to go. The name stuck though.

Tarball releases are available here: https://github.com/Andersbakken/rtags/releases/

TLDR Quickstart

We assume you have something to generate a JSON Compilation Database for your project. Your build system probably has a way to generate it, or you can look at something like Bear.

Build RTags

git clone --recursive https://github.com/Andersbakken/rtags.git
cd rtags
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .
make

Start the RTags daemon (rdm)

./bin/rdm &

Index the RTags project, and wait until rdm is silent

./bin/rc -J .

Open source file in emacs

emacs +74:34 src/rdm.cpp

Load rtags.el

M-: (load-file "rtags.el") RET

Ensure rc can be found

M-x set-variable RET rtags-path RET "../bin" RET

Call rtags-find-symbol-at-point

M-x rtags-find-symbol-at-point RET

Your location is now on the definition of Server::instance()

Documentation

The documentation can be found in the Wiki.

Disclaimer

RTags is still under development and is not the most stable piece of software you’ll ever find. We’re constantly working to improve on it.

Issues
  • Completion does not seem to work

    Completion does not seem to work

    With the following code (with the cursor at the end of the last foo. line), I was hoping rtags-code-complete-at would suggest the two field names. Or at least do something, but it seems not to do anything.

    rc --code-completion-enabled reports 1, and the project is loaded and other things work (like rtags-find-symbol-at-point).

    struct Foo {
      int field_1;
      int another_field_2;
    };
    
    void one()
    {
      Foo foo;
      foo.field_1 = 2;
      foo.
    }
    

    (Calling it by hand also seems not to do what I expect, but by the looks of it it's waiting for input from stdin, so likely that's expected.)

    opened by brucestephens 32
  • I'd like to volunteer porting rtags to windows

    I'd like to volunteer porting rtags to windows

    There have already been some people asking if rtags can be built on windows (current answer is no), but I would venture to try to make it portable.

    I would start by porting rct, which I understand to be the principal abstraction layer behind rtags. Now my question is: Could you give me some pointers on where to start or some overview what portions are currently depending on unix/posix functions?

    Is an issue report actually the correct way to discuss such topics or is there a better way, like a forum or something?

    assigned enhancement 
    opened by Gei0r 27
  • `rtags-find-symbol-at-point' stops working after saving a source file

    `rtags-find-symbol-at-point' stops working after saving a source file

    I just compiled the latest rtags d1a4728. I noticed that rtags-find-symbol-at-point works fine as long as the source files never get saved. However, once I change something in a file and save it, the command rtags-find-symbol-at-point no longer works. Here's my steps to reproduce:

    1. Open a terminal window, and run rdm &, the terminal prints the following:

      Running with 8 jobs, using args: -ferror-limit=0 -Wall -fspell-checking -Wno-unknown-warning-option Includepaths: -isystem /usr/local/lib/clang/3.6.0/include/
      
    2. Find a C++ source file in Emacs.

    3. Move point to a function call, and run M-x rtags-find-symbol-at-point, it works, and the point moves to the function definition!

    4. Now insert a space any where in the buffer, then deleted the newly inserted space just to make the buffer dirty but introduces no changes.

    5. Save the buffer.

    6. Check the terminal window but no messages were printed.

    7. Move point to the same function call, and run M-x rtags-find-symbol-at-point, it no longer works, but shows the RTags: No results" message.

    8. Switch to terminal window, and run rc -C followed by rc -J, the terminal window the prints the following message:

      [Server] Compilation database loaded
      
      [100%] 1/1 15:43:48 ~/temp/myexp.cpp in 502ms. (83 syms, 45 symNames, 8 includes, 1 of 191 files, symbols: 94 of 9237, 0 queried) (487/15/0ms) (dirty). (priority 1)
      Jobs took 0.51s. We're using 2mb of memory.
      

      As expected, M-x rtags-find-symbol-at-point works again. Now, if we run touch myexp.cpp to change the time stamp, the terminal window would print the messages:

      [100%] 1/1 15:43:48 ~/temp/myexp.cpp in 502ms. (83 syms, 45 symNames, 8 includes, 1 of 191 files, symbols: 94 of 9237, 0 queried) (487/15/0ms) (dirty). (priority 1)
      Jobs took 0.51s. We're using 2mb of memory.
      

      and as expected, M-x rtags-find-symbol-at-point works.

    opened by YorkZ 27
  • How does one use -J and compile_commands.json?

    How does one use -J and compile_commands.json?

    I'm trying to use rtags on rtags. Presumbly that works, somehow. I used ninja to generate compile_commands.json and put it in the build area, not the source area. I then ran rdm with working directory in the build area. I put .rtags-config at the root of the source directory, with the project: iine set up correctly (I think). I can see that rc commands are sent to rdm, but rdm does not ever seem to index anything.

    I would have thought that running "rc -J $buildArea" would send all the files in $buildArea/compile_commands.json to rdm for processing. But apparently I misunderstand.

    Thanks.

    opened by BillWhite 27
  • Add autocompletion support

    Add autocompletion support

    Hello,

    Don't pull this yet, this is work in progress.

    Eventually this will fix #155 and is related to company-mode/company-mode#82

    @dgutov: can you help me with the source? Right now this is very basic but somewhat "works".

    I ripped parts of company-clang but probably not enough :)

    Basically one of the issue is that (rtags-update-completions) is asynchronous, but let's keep this for latter. Right now pressing . then erasing it then pressing . again gives somewhat correct completions.

    I have other issues that are more important to fix, namely that in the case of overloads for c++, I need to insert append on selection but I would like to display append(const char* s), it looks like I can't use meta, annotate or candidate for this because it's a special case. Any pointers?

    Right now the data I receive is like this (but that will likely be changed as it's a bit silly):

    '("append" "string& append(const char* s)" "CXXMETHOD" "append" "string& append(const string& s)" "CXXMETHOD")
    
    opened by Silex 26
  • RAM usage issue.

    RAM usage issue.

    With the latest version f2506bab26a22b31123eafc9f46c467a0d3e9722, there seems to be a memory leak: randomly (e.g. when I change some code, then try to undo, or maybe just try to switch between buffers ), rdm RAM usage increases quickly until it reaches ~10 GB of RAM (rdm usually takes 2-3 GB when I'm navigating this specific project ). restarting rdm helps, but it has to be performed once in ~10 mins. Starting rdm with: rdm -E -u 5 & The rdm log is saying that it is performing a lookup action, something like: bin/rc --with-project="source_path" --path-filter "source_path" -r "source_path",2184 -e -N

    This happens since I pulled f2506bab26a22b31123eafc9f46c467a0d3e9722( pls note that I edited rtags.el to correct a (buffer) usage:

    •         (path (buffer-file-name (buffer)))
      
    •         (path (buffer-file-name buffer))
      

    The older revision I used was 0d506d6f62358486e89fb53ffa4bcfc9cf9f2cdd. This one worked just fine.

    opened by dfszb 25
  • When I used rtags-find-symbol-at-point(),

    When I used rtags-find-symbol-at-point(), "Wrong type argument: number-or-market-p, \"Aborted\"" was printed

    Please mark appropriate

    • [x] rtags (rdm/rc/rp)
    • Emacs Lisp
      • [ ] ac-rtags.el
      • [x] company-rtags.el
      • [x] helm-rtags.el
      • [x] flyhcheck-rtags.el
      • [ ] ivy-rtags.el
      • [x] rtags.el

    Problem description

    Describe briefly the problem. I'm developing some c++ projects with emacs on CentOS 7.3. But I have faced some problems. If I pressed "C-c r ." to use "rtags-find-symbol-at-point ()" Follow message was showing. Wrong type argument: number-or-market-p, "Aborted" image I have indexed the project with makefile image

    Expected behavior

    Just go to the definition of the function.....

    Actual behavior

    Describe what actually happened.

    Environment

    • Emacs Version : 25.3

    • Your operating system: CentOS 7.3

    • LLVM/Clang version: 3.4.2 ( Installed llvm family with yum commands )

    image

    Feature request

    Enough~ uukj

    opened by jongyoungcha 21
  • How to compile rtags with mingw (or clang) on windows?

    How to compile rtags with mingw (or clang) on windows?

    I have troubles installing rtags. I'm on windows 7, I have emacs, cmake, mingw, clang and visual studio 2008 installed here. I followed installation instructions, but it gave me this error after command cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .

    Could NOT find llvm-config executable and LIBCLANG_CXXFLAGS is not set

    And indeed I don't have it in my LLVM\bin. Maybe I installed wrong version of clang?

    wontfix 
    opened by mzbab88 21
  • Syntax highlighting

    Syntax highlighting

    Is it completely insane to ask whether it would be possible to write a major mode for C++ that uses rtags to query the type of token for syntax highlighting, instead of doing it regex based?

    I found myself contemplating a switch to spacemacs + rtags this weekend. There's a handful of places where it falls short of Eclipse (and of course places where it's stronger as well). One of these is that in Eclipse, syntax highlighting is based on the AST. Not only is this going to be accurate whenever your index is, but it also lets you make a lot more interesting distinctions. For example, static variables can be italicized (not just at declaration, but also whenever used), member functions can be a different color from functions (inside another member function of the same class they can't be distinguished by ege or regex), etc.

    Given that rtatgs has all this information available, it seems like this should be possible in principle. So a major mode could try querying rtags for the information by calling appropriate functions, and then fall back to the regex when necessary.

    enhancement 
    opened by quicknir 21
  • Support for copying the rtags database

    Support for copying the rtags database

    It would be very helpful to store in the rtags database, the file paths relative to a 'sandbox root'.

    Given a source tree anchored at a 'sandbox root', e.g.

    /local-ssd/$USER/tree1
    

    where suppose the sources have been indexed and saved into /local-ssd/$USER/tree1/.rtags which was done by starting rdm using

    rdm --socket-file=/local-ssd/$USER/tree1/.rtags/rdm_socket \
        --data-dir=/local-ssd/$USER/tree1/.rtags/rtags \
        --log-file=/local-ssd/$USER/tree1/.rtags/rdm.log \
        --crash-dump-file=/local-ssd/$USER/tree1/.rtags/rdm_crash_dump.log \
        --silent \
        --job-count=$nCores \
        --watch-sources-only
    

    One can copy the sandbox to another location using btrfs instantly

    btrfs subvolume snapshot /local-ssd/$USER/tree1 /local-ssd/$USER/tree2
    

    (or more slowly using say cp -r or rsync).

    After the sandbox has been copied to tree2, the rtags database is no longer valid because it has absolute paths to files in /local-ssd/$USER/tree1. Thus, one needs to delete the pre-generated rtags database in tree2 and regenerate it to correct the paths. This regeneration takes hours on a large code base.

    Therefore, it would be very helpful if all paths under the sandbox root to be made relative to the sandbox root.

    opened by JohnC32 21
  • build failure using 7cee718ce6b21947954c6b12bec1e4c70092a9f2

    build failure using 7cee718ce6b21947954c6b12bec1e4c70092a9f2

    Build fails right now with following using 7cee718ce6b21947954c6b12bec1e4c70092a9f2 :

    git clone --recursive https://github.com/Andersbakken/rtags.git
    cd rtags
    mkdir build
    cd build
    cmake ..
    make
    
    /home/ville/src/rtags/src/AST.cpp: In static member function ‘static std::shared_ptr<AST> AST::create(const Source&, CXTranslationUnit)’:
    /home/ville/src/rtags/src/AST.cpp:114:1: warning: no return statement in function returning non-void [-Wreturn-type]
    /home/ville/src/rtags/src/AST.cpp: In member function ‘List<AST::Diagnostic> AST::diagnostics() const’:
    /home/ville/src/rtags/src/AST.cpp:118:1: warning: no return statement in function returning non-void [-Wreturn-type]
    /home/ville/src/rtags/src/AST.cpp: In member function ‘List<AST::SkippedRange> AST::skippedRanges() const’:
    /home/ville/src/rtags/src/AST.cpp:122:1: warning: no return statement in function returning non-void [-Wreturn-type]
    
    [ 83%] Linking CXX executable ../bin/rc
    librtags.a(AST.cpp.o): In function `AST::create(Source const&, CXTranslationUnitImpl*)':
    AST.cpp:(.text+0xe7b): undefined reference to `lua_absindex'
    AST.cpp:(.text+0xe8e): undefined reference to `lua_rotate'
    ...
    
    opened by ville-h 20
  • rtags not indexing the functions fully even for rtags source code.

    rtags not indexing the functions fully even for rtags source code.

    Describe the bug rtags not indexing the complete function and i can not see the symbol info for a part of function. This leads to various commands not working i.e jump to definition, references, symbol info etc.

    To Reproduce Steps to reproduce the behavior:

    1. Index the rtags repo with rc -J <compile_command dir>
    2. Some part do not work for rc commands given below.

    Expected behavior functions should be indexed and all expected symbols should be available.

    Screenshots/Backtrace The following piece of code does not index in given function. This is one example from rtags repo itself.

    File: src/ClangIndexer.cpp Function: bool ClangIndexer::superclassTemplateMemberFunctionUgleHack(const CXCursor &cursor, CXCursorKind kind, Location location, const CXCursor &/ref/, Symbol **cursorPtr)

            case 1:
                // ### not sure this is correct with line/col
                return handleReference(cursor, kind,
                                       Location(location.fileId(), location.line(), location.column() + 1),
                                       alternatives.front(), cursorPtr);
                break;
            case 0:
                break;
            default:
                warning() << "Can't decide which of these symbols are right for me"
                          << cursor << alternatives
                          << "Need to parse types";
                break;
            }
        }
    

    ----> Here cursor on handleReference() do not jump to definition(no commands works like references, symbol info etc) and also no output for rc command (rc --absolute-path -f src/ClangIndexer.cpp:991:24 and similar)

    --> dump of file map shows no content for above mentioned code lines. From 987 to 1004, there is no database for any symbols.

    | src/ClangIndexer.cpp:987:30:   | Symbol(src/ClangIndexer.cpp:987:30: SymbolName: const List<CXCursor>   |
    *                                * alternatives Kind: VarDecl Type: const List<CXCursor> SymbolLength:    *
    *                                * 12 Range: 987:9-987:42 Linkage: No Linkage Definition Usr:             *
    *                                * c:[email protected]@[email protected]@[email protected] *
    *                                * tionUgleHack#&[email protected]@CXCursor#[email protected]@CXCursorKind#[email protected]@Location#S0_#**[email protected]@S *
    *                                * ymbol#@alternatives                                                    *
    *                                * )                                                                      *
    | src/ClangIndexer.cpp:1004:5:   | Symbol(src/ClangIndexer.cpp:1004:5: SymbolName: return Kind:           |
    *                                * ReturnStmt SymbolLength: 6 Range: 1004:5-1004:17 )                     *
    

    Environment (please complete the following information):

    • OS/Version: macOS 12.2.1
    • RTags(rdm,rc): 2.41.134 (compiled from latest, issue is seen with older versions, i do not know if this worked for any version)
    • Emacs: using VIM.
    • LLVM/Clang: Apple clang version 13.0.0 (clang-1300.0.29.30)/13.0.1
    opened by akh2008 0
  • rtags.el doesn't produce any diagnostics anymore (flycheck in turn neither)

    rtags.el doesn't produce any diagnostics anymore (flycheck in turn neither)

    Since a while I don't get any diagnostics anymore from rtags.el. The RTags Diagnostics buffer is always empty (even when there are errors) and flycheck can't display any errors either. This might be related to https://github.com/Andersbakken/rtags/issues/1428, as I have to disable the rdm diagnostics output, or else rdm will crash.

    Steps to reproduce the behavior:

    1. install current rtags via brew
    2. enable rtags.el in emacs
    3. visit any project indexed by rtags, which contains errors or warnings

    Expected behavior I would expect to see diags in the RTags Diagnostics buffer and highlights by flycheck.

    • OS/Version: Ubuntu 20.04.4 LTS
    • RTags(rdm,rc): 2.38.130
    • Emacs: GNU Emacs 27.1
    • LLVM/Clang: 13.0.1
    opened by root42 1
  • error about building rtags: make

    error about building rtags: make

    I try to build rtags in my ubantu 20.04,

    git clone https://github.com/Andersbakken/rtags.git
    cd rtags/
    git submodule init
    git submodule update
    mkdir mybuild && cd mybuild
    cmake ..
    make
    

    but when I use the command :make ,an error appeared as followed.

    [  1%] Building CXX object src/CMakeFiles/rtags.dir/ClangIndexer.cpp.o
    [  2%] Building CXX object src/CMakeFiles/rtags.dir/ClangThread.cpp.o
    [  4%] Building CXX object src/CMakeFiles/rtags.dir/ClassHierarchyJob.cpp.o
    [  5%] Building CXX object src/CMakeFiles/rtags.dir/CompilerManager.cpp.o
    [  7%] Building CXX object src/CMakeFiles/rtags.dir/CompletionThread.cpp.o
    [  8%] Building CXX object src/CMakeFiles/rtags.dir/DependenciesJob.cpp.o
    [  9%] Building CXX object src/CMakeFiles/rtags.dir/IncludePathJob.cpp.o
    [ 11%] Building CXX object src/CMakeFiles/rtags.dir/FileManager.cpp.o
    [ 12%] Building CXX object src/CMakeFiles/rtags.dir/FindFileJob.cpp.o
    [ 14%] Building CXX object src/CMakeFiles/rtags.dir/FindSymbolsJob.cpp.o
    [ 15%] Building CXX object src/CMakeFiles/rtags.dir/FollowLocationJob.cpp.o
    [ 16%] Building CXX object src/CMakeFiles/rtags.dir/IncludeFileJob.cpp.o
    [ 18%] Building CXX object src/CMakeFiles/rtags.dir/IndexMessage.cpp.o
    [ 19%] Building CXX object src/CMakeFiles/rtags.dir/IndexParseData.cpp.o
    [ 21%] Building CXX object src/CMakeFiles/rtags.dir/IndexerJob.cpp.o
    [ 22%] Building CXX object src/CMakeFiles/rtags.dir/JobScheduler.cpp.o
    [ 23%] Building CXX object src/CMakeFiles/rtags.dir/ListSymbolsJob.cpp.o
    [ 25%] Building CXX object src/CMakeFiles/rtags.dir/Location.cpp.o
    [ 26%] Building CXX object src/CMakeFiles/rtags.dir/Preprocessor.cpp.o
    [ 28%] Building CXX object src/CMakeFiles/rtags.dir/Project.cpp.o
    [ 29%] Building CXX object src/CMakeFiles/rtags.dir/QueryJob.cpp.o
    [ 30%] Building CXX object src/CMakeFiles/rtags.dir/QueryMessage.cpp.o
    [ 32%] Building CXX object src/CMakeFiles/rtags.dir/RClient.cpp.o
    [ 33%] Building CXX object src/CMakeFiles/rtags.dir/RTags.cpp.o
    [ 35%] Building CXX object src/CMakeFiles/rtags.dir/ReferencesJob.cpp.o
    [ 36%] Building CXX object src/CMakeFiles/rtags.dir/Sandbox.cpp.o
    [ 38%] Building CXX object src/CMakeFiles/rtags.dir/ScanThread.cpp.o
    [ 39%] Building CXX object src/CMakeFiles/rtags.dir/Server.cpp.o
    [ 40%] Building CXX object src/CMakeFiles/rtags.dir/ServerMessageHandlers.cpp.o
    [ 42%] Building CXX object src/CMakeFiles/rtags.dir/Source.cpp.o
    [ 43%] Building CXX object src/CMakeFiles/rtags.dir/StatusJob.cpp.o
    [ 45%] Building CXX object src/CMakeFiles/rtags.dir/Symbol.cpp.o
    [ 46%] Building CXX object src/CMakeFiles/rtags.dir/SymbolInfoJob.cpp.o
    [ 47%] Building CXX object src/CMakeFiles/rtags.dir/Token.cpp.o
    [ 49%] Building CXX object src/CMakeFiles/rtags.dir/TokensJob.cpp.o
    [ 50%] Linking CXX static library librtags.a
    [ 50%] Built target rtags
    Scanning dependencies of target rct
    [ 52%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Buffer.cpp.o
    [ 53%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Config.cpp.o
    [ 54%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Connection.cpp.o
    [ 56%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/CpuUsage.cpp.o
    [ 57%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Date.cpp.o
    [ 59%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/EventLoop.cpp.o
    [ 60%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/FileSystemWatcher.cpp.o
    [ 61%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Log.cpp.o
    [ 63%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/MemoryMonitor.cpp.o
    [ 64%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Message.cpp.o
    [ 66%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/MessageQueue.cpp.o
    [ 67%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Path.cpp.o
    [ 69%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Plugin.cpp.o
    [ 70%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Rct.cpp.o
    [ 71%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/ReadWriteLock.cpp.o
    [ 73%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/Semaphore.cpp.o
    [ 74%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/SharedMemory.cpp.o
    [ 76%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/SocketClient.cpp.o
    [ 77%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/SocketServer.cpp.o
    [ 78%] Building CXX object src/CMakeFiles/rct.dir/rct/rct/String.cpp.o
    /home/xjb/rtags/src/rct/rct/String.cpp:3:10: fatal error: zconf.h:No such file or directory
        3 | #include <zconf.h>
          |          ^~~~~~~~~
    compilation terminated.
    make[2]: *** [src/CMakeFiles/rct.dir/build.make:310:src/CMakeFiles/rct.dir/rct/rct/String.cpp.o] error 1
    make[1]: *** [CMakeFiles/Makefile2:1110:src/CMakeFiles/rct.dir/all] error 2
    make: *** [Makefile:141:all] error 2
    
    

    so, how should I solve this ?

    opened by xiaojbing 1
  • fails to find call to method on object of type

    fails to find call to method on object of type "auto"

    When the cursor is placed on "joe", and rtags-find-references-at-point is run, rtags fails to find the call in the lambda body:

    struct Blob {
       int joe() {
          return [](auto blob){ return blob.joe(); } (Blob{});
       }
    };
    
    int main() {
       return Blob{}.joe();
    }
    

    Expected behavior Make it find the call in the lambda body.

    Environment (please complete the following information):

    • OS/Version: Debian 11.1
    • RTags(rdm,rc): 2.41.134
    • Emacs: 27.1
    • LLVM/Clang: LLVM 1:11.0-51+nmu5 and Debian clang version 11.0.1-2
    opened by Jacob-Burckhardt 0
  • rdm crashed at completion

    rdm crashed at completion

    Describe the bug I have used rtags for serval years and it works perfectly. However it start to crash often today and I don't know anything is changed. The core stack is below:

    ==105211== Invalid read of size 4
    ==105211==    at 0x7544B1F: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==121782==  Address 0x11f29060 is not stack'd, malloc'd or (recently) free'd
    ==121782== 
    Caught signal 11
    

    Here is the complete list of valgrind checking result before the crash.

    /usr/local/bin/rc --current-file=/u01/yizhi/github/cstore2/src/backend/cstore/orc_bridge.c -b --unsaved-file=/u01/yizhi/github/cstore2/src/backend/cstore/orc_bridge.c:/tmp/r1mrO1 -z -t128 --code-complete-at /u01/yizhi/github/cstore2/src/backend/cstore/orc_bridge.c:29:2: --synchronous-completions --elisp --code-complete-prefix=init_orc_w
    ==105211== Thread 3:
    ==105211== Invalid read of size 8
    ==105211==    at 0x57C08E7: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211==  Address 0x10e815e8 is 56 bytes inside a block of size 14,392 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x57F8E0C: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211== 
    ==105211== Invalid read of size 4
    ==105211==    at 0x7545230: non-virtual thunk to clang::ASTReader::ReadSLocEntry(int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0x10e8373c is 8,588 bytes inside a block of size 14,392 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x57F8E0C: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211== 
    ==105211== Invalid read of size 4
    ==105211==    at 0x7544A8C: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0x10e81828 is 632 bytes inside a block of size 14,392 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x57F8E0C: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211== 
    ==105211== Invalid read of size 8
    ==105211==    at 0x7544A93: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0x10e81820 is 624 bytes inside a block of size 14,392 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x57F8E0C: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211== 
    ==105211== Invalid read of size 4
    ==105211==    at 0x7544AC2: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0x10e81830 is 640 bytes inside a block of size 14,392 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x57F8E0C: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211== 
    ==105211== Invalid read of size 8
    ==105211==    at 0x7544B01: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0x10e81838 is 648 bytes inside a block of size 14,392 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x57F8E0C: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==    by 0xC322EDE: clone (in /usr/lib64/libc-2.24.so)
    ==105211== 
    ==105211== Invalid read of size 4
    ==105211==    at 0x7544B05: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0xcae6cac is 1,468 bytes inside a block of size 3,360 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x76120D7: clang::serialization::ModuleManager::~ModuleManager() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x7520322: clang::ASTReader::~ASTReader() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x752069C: non-virtual thunk to clang::ASTReader::~ASTReader() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x7615209: clang::serialization::ModuleManager::addModule(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, clang::serialization::ModuleFile*, unsigned int, long, long, clang::ASTFileSignature, clang::ASTFileSignature (*)(llvm::StringRef), clang::serialization::ModuleFile*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x752857E: clang::ASTReader::ReadASTCore(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, clang::serialization::ModuleFile*, llvm::SmallVectorImpl<clang::ASTReader::ImportedModule>&, long, long, clang::ASTFileSignature, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x7560200: clang::ASTReader::ReadAST(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, unsigned int, llvm::SmallVectorImpl<clang::ASTReader::ImportedSubmodule>*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F8F6F: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211== 
    ==105211== Invalid read of size 8
    ==105211==    at 0x7544B0C: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0xcae6cb8 is 1,480 bytes inside a block of size 3,360 free'd
    ==105211==    at 0x4C2F4C8: operator delete(void*) (vg_replace_malloc.c:586)
    ==105211==    by 0x76120D7: clang::serialization::ModuleManager::~ModuleManager() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x7520322: clang::ASTReader::~ASTReader() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x752069C: non-virtual thunk to clang::ASTReader::~ASTReader() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC081: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FC508: clang::CompilerInstance::~CompilerInstance() (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F3005: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6DC449C: ExecuteOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211==  Block was alloc'd at
    ==105211==    at 0x4C2E4AA: operator new(unsigned long) (vg_replace_malloc.c:344)
    ==105211==    by 0x7615209: clang::serialization::ModuleManager::addModule(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, clang::serialization::ModuleFile*, unsigned int, long, long, clang::ASTFileSignature, clang::ASTFileSignature (*)(llvm::StringRef), clang::serialization::ModuleFile*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x752857E: clang::ASTReader::ReadASTCore(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, clang::serialization::ModuleFile*, llvm::SmallVectorImpl<clang::ASTReader::ImportedModule>&, long, long, clang::ASTFileSignature, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x7560200: clang::ASTReader::ReadAST(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, unsigned int, llvm::SmallVectorImpl<clang::ASTReader::ImportedSubmodule>*) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F8F6F: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, clang::DependencyFileGenerator*, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57FE3F0: clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5842A76: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57F2FC4: clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&, llvm::SmallVectorImpl<llvm::MemoryBuffer const*>&) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x555715A: clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef<CXUnsavedFile>, unsigned int) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x5557C3B: void llvm::function_ref<void ()>::callback_fn<clang_codeCompleteAt::{lambda()#1}>(long) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5EC12: llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x6D5ED13: RunSafelyOnThread_Dispatch(void*) (in /usr/local/lib/libclang.so.7)
    ==105211== 
    ==105211== Invalid read of size 4
    ==105211==    at 0x7544B1F: clang::ASTReader::ReadSLocEntry(int) [clone .part.2196] (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C08EC: clang::SourceManager::loadSLocEntry(unsigned int, bool*) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C0C4B: clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x57C18AC: clang::SourceManager::getFileIDLoaded(unsigned int) const (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x557BCE1: clang_getSpellingLocation (in /usr/local/lib/libclang.so.7)
    ==105211==    by 0x42D6C3: RTags::DiagnosticsProvider::createLocation(CXSourceLocation const&, bool*, unsigned int*) (RTags.h:291)
    ==105211==    by 0x428FBF: RTags::DiagnosticsProvider::diagnose() (RTags.cpp:830)
    ==105211==    by 0x4F100B: CompletionThread::processDiagnostics(CompletionThread::Request const*, CXCodeCompleteResults*, CXTranslationUnitImpl*) (CompletionThread.cpp:862)
    ==105211==    by 0x4EBB09: CompletionThread::process(CompletionThread::Request*) (CompletionThread.cpp:431)
    ==105211==    by 0x4E5243: CompletionThread::run() (CompletionThread.cpp:111)
    ==105211==    by 0x5A697D: Thread::localStart(void*) (Thread.cpp:23)
    ==105211==    by 0xB2296C9: start_thread (in /usr/lib64/libpthread-2.24.so)
    ==105211==  Address 0xe6c9ed8 is not stack'd, malloc'd or (recently) free'd
    ==105211== 
    Caught signal 11
    rdm[0x413b06]
    /usr/lib64/libpthread.so.0(+0x115d0)[0xb2335d0]
    /usr/lib64/libpthread.so.0(raise+0x7d)[0xb23347d]
    /usr/local/lib/libclang.so.7(+0x1f23b30)[0x6d5eb30]
    /usr/lib64/libpthread.so.0(+0x115d0)[0xb2335d0]
    /usr/local/lib/libclang.so.7(+0x2709b1f)[0x7544b1f]
    /usr/local/lib/libclang.so.7(+0x9858ed)[0x57c08ed]
    /usr/local/lib/libclang.so.7(+0x985c4c)[0x57c0c4c]
    /usr/local/lib/libclang.so.7(+0x9868ad)[0x57c18ad]
    /usr/local/lib/libclang.so.7(clang_getSpellingLocation+0x1e2)[0x557bce2]
    rdm[0x42d6c4]
    rdm[0x428fc0]
    rdm[0x4f100c]
    rdm[0x4ebb0a]
    rdm[0x4e5244]
    rdm[0x5a697e]
    /usr/lib64/libpthread.so.0(+0x76ca)[0xb2296ca]
    /usr/lib64/libc.so.6(clone+0x5f)[0xc322edf]
    ==105211== 
    ==105211== HEAP SUMMARY:
    ==105211==     in use at exit: 25,278,368 bytes in 206,819 blocks
    ==105211==   total heap usage: 691,305 allocs, 484,486 frees, 174,621,703 bytes allocated
    ==105211== 
    ==105211== LEAK SUMMARY:
    ==105211==    definitely lost: 0 bytes in 0 blocks
    ==105211==    indirectly lost: 0 bytes in 0 blocks
    ==105211==      possibly lost: 608 bytes in 2 blocks
    ==105211==    still reachable: 25,277,760 bytes in 206,817 blocks
    ==105211==         suppressed: 0 bytes in 0 blocks
    ==105211== Rerun with --leak-check=full to see details of leaked memory
    ==105211== 
    ==105211== For lists of detected and suppressed errors, rerun with: -s
    ==105211== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
    

    Environment (please complete the following information):

    • OS/Version: Linux 3.10.0-327.ali2008.alios7.x86_64
    • RTags(rdm,rc): rdm/rc: 2.41.134
    • Emacs: 27.2
    • LLVM/Clang: /usr/local/lib/libclang.so.7

    Thanks for the creating the great product for free!

    opened by zhihuiFan 3
  • An option to log local time timestamps into --log-file.

    An option to log local time timestamps into --log-file.

    Is your feature request related to a problem? Please describe. Command line option --log-timestamp logs time passed since the start of rdm, not the local time.

    Describe the solution you'd like Another command line option that logs the local time.

    Describe alternatives you've considered I read man rtags-rdm in Ubuntu 20.04 LTS, which refers to rdm 2.37.130, and couldn't find an option for the timestamp to be the local time.

    Additional context rdm 2.37.130 packaged in Ubuntu 20.04 LTS seems to be 2 years old. I didn't try compiling a newer version.

    My ~/.rdmrc:

    --log-file=~/rdm.log
    --no-Wall
    --rp-nice-value 15
    --enable-compiler-manager
    --no-comments
    --log-timestamp
    
    opened by max0x7ba 0
Releases(v2.38)
A vim plugin for libclang-based highlighting of C, C++, ObjC

color_coded: semantic highlighting with vim color_coded is a vim plugin that provides realtime (fast), tagless code highlighting for C++, C, and Objec

Jeaye Wilkerson 858 Jun 25, 2022
A C/C++ minor mode for Emacs powered by libclang

Irony-Mode A C/C++ minor mode powered by libclang irony-mode is an Emacs minor-mode that aims at improving the editing experience for the C, C++ and O

Guillaume Papin 893 Aug 11, 2022
C-Toy is an interactive C(99) coding environment based on TCC.

C-Toy is an interactive C(99) coding environment based on TCC.

Anaël Seghezzi 1.1k Aug 12, 2022
C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more

Archived cquery is no longer under development. clangd and ccls are both good replacements. cquery cquery is a highly-scalable, low-latency language s

Jacob Dufault 2.3k Jul 27, 2022
C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more

Archived cquery is no longer under development. clangd and ccls are both good replacements. cquery cquery is a highly-scalable, low-latency language s

Jacob Dufault 2.3k Aug 11, 2022
C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting

ccls ccls, which originates from cquery, is a C/C++/Objective-C language server. code completion (with both signature help and snippets) definition/re

Fangrui Song 3.1k Aug 11, 2022
A vim plugin for libclang-based highlighting of C, C++, ObjC

color_coded: semantic highlighting with vim color_coded is a vim plugin that provides realtime (fast), tagless code highlighting for C++, C, and Objec

Jeaye Wilkerson 858 Jun 25, 2022
A cross-platform flutter plugin for C/C++/ObjC crash report via Google Breakpad

quick_breakpad A cross-platform flutter plugin for C/C++/ObjC crash report via Google Breakpad Use breakpad for quick_breakpad_example $CLI_BREAKPAD i

Woodemi Co., Ltd 16 Jul 30, 2022
web server & client. Fully C++/WebAssembly. Server runs on google cloud function. Client uses a C++ virtual dom.

Starter project. A web server and client fully made with C++/WebAssembly. A simple CMake configuration describes how to build and run everything.

null 3 Aug 6, 2021
A C/C++ minor mode for Emacs powered by libclang

Irony-Mode A C/C++ minor mode powered by libclang irony-mode is an Emacs minor-mode that aims at improving the editing experience for the C, C++ and O

Guillaume Papin 893 Aug 11, 2022
A C/C++ minor mode for Emacs powered by libclang

Irony-Mode A C/C++ minor mode powered by libclang irony-mode is an Emacs minor-mode that aims at improving the editing experience for the C, C++ and O

Guillaume Papin 893 Aug 11, 2022
C++ font-lock for Emacs

Syntax highlighting support for "Modern C++" - until C++20 and Technical Specification. This package aims to provide a simple highlight of the C++ lan

Ludwig PACIFICI 168 Jul 13, 2022
MINCE is an Emacs-like text editor from Mark of the Unicorn, Inc.

MINCE Is Not Complete[ly] EMACS Overview MINCE is an Emacs-like text editor from Mark of the Unicorn, Inc. Versions were available for many oper

Jeffrey H. Johnson 20 Jul 18, 2022
tree-sitter grammar for emacs lisp

Tree-sitter Grammar for Emacs Lisp A simple tree-sitter grammar for elisp. Syntax supported: Atoms (integers, floats, strings, characters, symbols) Li

Wilfred Hughes 20 Jun 17, 2022
te is a small text editor with emacs keybindings.

te - a tiny emacs te is a small text editor with emacs keybindings. Here are söme Ümlautß! Oh no. Come, you spirits That tend on mortal thoughts, unse

Leah Neukirchen 21 Jun 8, 2022
Frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg memory-based learning software package.

Frog - A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch Copyright 2006-2020 Ko van der Sloot, Maarten van Gompel, Antal van den

Language Machines 69 Jun 20, 2022
Frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg memory-based learning software package.

Frog - A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch Copyright 2006-2020 Ko van der Sloot, Maarten van Gompel, Antal van den

Language Machines 69 Jun 20, 2022
Qt-oriented static code analyzer based on the Clang framework

WARNING: master is the development branch. Please use the v1.10 branch. clazy v1.11 clazy is a compiler plugin which allows clang to understand Qt sem

KDE GitHub Mirror 529 Aug 13, 2022
Bear is a tool that generates a compilation database for clang tooling.

ʕ·ᴥ·ʔ Build EAR Bear is a tool that generates a compilation database for clang tooling. The JSON compilation database is used in the clang project to

László Nagy 2.9k Aug 15, 2022
A tool for use with clang to analyze #includes in C and C++ source files

Include What You Use For more in-depth documentation, see docs. Instructions for Users "Include what you use" means this: for every symbol (type, func

null 2.9k Aug 11, 2022
A tool for use with clang to analyze #includes in C and C++ source files

Include What You Use For more in-depth documentation, see docs. Instructions for Users "Include what you use" means this: for every symbol (type, func

null 2.9k Aug 13, 2022
🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.

ModernCppStarter Setting up a new C++ project usually requires a significant amount of preparation and boilerplate code, even more so for modern C++ p

Lars Melchior 2.8k Aug 15, 2022
A template for modern C++ projects using CMake, Clang-Format, CI, unit testing and more, with support for downstream inclusion.

Modern C++ Template A quick C++ template for modern CMake projects, aimed to be an easy to use starting point. This is my personal take on such a type

Filip Dutescu 1.1k Aug 11, 2022
Clang plugin to find method or property directable.

ObjCDirectFinder Clang had provided objc_direct attribute for us to write this: @property (nonatomic, assign, direct) BOOL isLaunchFinished; - (BOOL)i

Kam-To 3 Jun 2, 2022
New ultra super robust and fast programming language, fully supportable by G++ and Clang

Cplusplusplus New ultra super robust and fast programming language, fully supportable by G++ and Clang How to use: Just write #include <C+++.h> in you

Vladimir Melnikov 1 Nov 29, 2021
A LLVM and Clang compiler toolchain built for kernel development

Cosmic-Clang Toolchain This is a LLVM and Clang compiler toolchain built for kernel development. Builds are always made from the latest LLVM sources r

Ǥђ๏ຮ₮⌁Ⲙครtє࿐ 0 Apr 12, 2022
Standardise code formating for cmake projects with git and clang-format

git-cmake-format This project aims to provide a quick and easy way to integrate clang-format into your CMake project hosted in a git repository, it co

Kenneth Benzie 47 Apr 14, 2022