1 Reply
      Latest reply on Apr 27, 2020 1:34 AM by arjunau
      cortodev Level 1 Level 1 (0 points)

        This morning I received a new update from Apple for the Xcode commandline tools (version 7.3). After this update was installed, code that is using gcov crashes on exit when a program has loaded a library using dlopen(). The library that is opened using dlopen also has coverage reporting enabled. When I don't dlopen the library the crash doesn't occur.

         

        The program crashes here:

        llvm_writeout_files + 20

         

        Full stack:

        llvm_writeout_files

        libsystem_c.dylib`__cxa_finalize_ranges

        libsystem_c.dylib`exit

         

        "llvm_writeout_files" is one of the functions that gets created when a program is using gcov. When code coverage is disabled, the error no longer occurs. I had no problems running with gcov before this update.

         

        The issue can be reproduced with these steps:

        git clone https://github.com/cortoproject/corto

        git clone https://github.com/cortoproject/c-binding

        cd corto

        source configure

        cd ..

        rake <<build will fail>>

        corto locate corto/gen/c/common <<application will crash>>

         

        Anyone else experiencing similar issues?