<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJzVGtty4jj2a8iLyi7fgYc80CTM9hbp7grpmXmjZFsGTduSV5YJzNfPkWTAF8Imne6t7VRijHTuNx1JiXl6uP1jS3OCpDhQtkGSo7imeYoKXMZ8P_IWpeCS_00EH3lz9EwQYQmvmSSCpEhuaYVoVdUEPVO5RUmOgcYoctzAdmzHGnkf4NdzPM9xnYkTBa7rqIEEZ3ESh5GTTi13NL4n-1J9HAHdSeC5ru15HpBCO4rRbLE0tBBmqZIiJjklO2IkUEITmGmLMteiUFmRPNNIjEuAJi1SzwKXJREjfzZy7kbO8Rk5za_-upI4-YbSuihPcAh-HBuhL4JvBC4QFpu6IExWAIHAYnUl4JnTWD3zXWG5AbzFlKnvqZ2Dda2_kSC54MiytrjaWpU85GTk321YDUPaAxYFMItsrQx4EGubCmQVCLRZ7yfROgqQlR4YLmhi5ZR9IwIZnlGguajBem8BqBUFdsVtD1kcJcXTfJ1GOEv7cu4nRjdFucEFWWAiEdK1-RD8EiAdAm6S5DK46xqcmGwoAzxr-XpMA3xZkvacbR9tMiSv8YzOA-xrDjzSPPHpoSCrzGtQyeKlBIcWSVnDh_FDb-6z3xvIyQYnB6vEVWUVmOENeNWycJ7zZ6uoc0nLnFgpySijknIG8aCkA0Qr5ziFz7MgPMF5V2ajq1EKZ2pyhRUdSO053xEB3JZPnyFU0PwBfyMLKAqVctEpZOyUKtKSVHI-50UJAMJOOi4fcm3zg6eVNIiWkG_E1I4Q0solV-HSiv5KXlLd6PsCwQZ5rZBtuZfIyiHelLErixGSQm3TI-sKxhjvDCevB35rMhCWvjbXmNHP5uea5EJNeqwZU3VcxRAQGlcYyvUOXhDES8HTGko9fIMCIUlRArY3ts8UYMp3kLN34GecjR1vEnteTFxk4mwGv9WhMi9fBGVSV8cngRMy8iZnIIGf17ySguBi5EVq4QDYkTcF-pP_rh1MLJe_P0DWqcIFpvng7InngBxAoius2xP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1lRE2Iv9uO7iRityq7X4B0R2Yjk>53108</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang 14 error: unable to execute command: Segmentation fault (core dumped)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          geeknik
      </td>
    </tr>
</table>

<pre>
    While trying to build mapbox/protozero, we encountered this issue with clang `14.0.0-++20220108064110+2cafbcb560d9-1~exp1~20220108184211.222` via AFL++ and we believe this to be an issue with Clang itself and not the AFL++ wrapper:

```
Stack dump:
    0.  Program arguments: /usr/lib/llvm-14/bin/ld.lld -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_d6afd /usr/lib/x8
6_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_6
4-linux-gnu -L/usr/lib/llvm-14/bin/../lib -L/lib -L/usr/lib -plugin-opt=mcpu=x86-64 -plugin-opt=O3 -plugin-opt=legacy-pass-manager --allow-multiple-definition -mllvm=-load=/usr/local/bin/../
lib/afl/SanitizerCoverageLTO.so CMakeFiles/cmTC_d6afd.dir/testCCompiler.c.o /usr/local/bin/../lib/afl/afl-compiler-rt.o /usr/local/bin/../lib/afl/afl-llvm-rt-lto.o --dynamic-list=/usr/local/
bin/../lib/afl/dynamic_list.txt -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/11/crtend.o /usr/lib/x86_64-linux-gnu/crtn
.o
    1.  Running pass 'sancov' on module 'ld-temp.o'.
     #0 0x00007f7028b22be1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe20be1)
     #1 0x00007f7028b2092e llvm::sys::RunSignalHandlers() (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe1e92e)
     #2 0x00007f7028b2311b (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe2111b)
     #3 0x00007f702e54a980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
     #4 0x00007f7023b5d93d llvm::Value::getType() const /usr/lib/llvm-14/include/llvm/IR/Value.h:255:34
     #5 0x00007f7023b5d93d (anonymous namespace)::ModuleSanitizerCoverage::instrumentFunction(llvm::Function&, llvm::function_ref<llvm::DominatorTree const* (llvm::Function&)>, llvm::functio
n_ref<llvm::PostDominatorTree const* (llvm::Function&)>) /root/AFLplusplus/instrumentation/SanitizerCoverageLTO.so.cc:1311:36
     #6 0x00007f7023b5d93d (anonymous namespace)::ModuleSanitizerCoverage::instrumentModule(llvm::Module&, llvm::function_ref<llvm::DominatorTree const* (llvm::Function&)>, llvm::function_re
f<llvm::PostDominatorTree const* (llvm::Function&)>) /root/AFLplusplus/instrumentation/SanitizerCoverageLTO.so.cc:1005:5
     #7 0x00007f7023b63a0d (anonymous namespace)::ModuleSanitizerCoverageLegacyPass::runOnModule(llvm::Module&) /root/AFLplusplus/instrumentation/SanitizerCoverageLTO.so.cc:316:25
     #8 0x00007f7028c63ee6 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xf61ee6)
     #9 0x00007f702a01d376 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::
vector<unsigned char, std::allocator<unsigned char> > const&) (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0x231b376)
    #10 0x00007f702a01f707 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0x231d707)
    #11 0x00007f702a014395 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>) (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0x2312395)
    #12 0x00007f702a013ba6 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)> > (unsigned int, llvm::StringRef)>) (/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1+0x2311ba6)
    #13 0x00000000005fb398 lld::elf::BitcodeCompiler::compile() (/usr/lib/llvm-14/bin/ld.lld+0x5fb398)
    #14 0x000000000058ad86 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, true> >(bool) (/usr/lib/llvm-14/bin/ld.lld+0x58ad86)
    #15 0x0000000000576135 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::opt::InputArgList&) (/usr/lib/llvm-14/bin/ld.lld+0x576135)
    #16 0x00000000005655ca lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/lib/llvm-14/bin/ld.lld+0x5655ca)
    #17 0x000000000056376f lld::elf::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&, llvm::raw_ostream&) (/usr/lib/llvm-14/bin/ld.lld+0x56376f)
    #18 0x00000000004a48a1 (/usr/lib/llvm-14/bin/ld.lld+0x4a48a1)
    #19 0x00000000004a419f main (/usr/lib/llvm-14/bin/ld.lld+0x4a419f)
    #20 0x00007f7026f6fbf7 __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
    #21 0x00000000004a3cea _start (/usr/lib/llvm-14/bin/ld.lld+0x4a3cea)
    clang: error: unable to execute command: Segmentation fault (core dumped)
    clang: error: linker command failed due to signal (use -v to see invocation)
    CMakeFiles/cmTC_d6afd.dir/build.make:97: recipe for target 'cmTC_d6afd' failed
    make[1]: *** [cmTC_d6afd] Error 254
    make[1]: Leaving directory '/root/protozero/build/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_d6afd/fast' failed
    make: *** [cmTC_d6afd/fast] Error 2
```

Command line: `git clone https://github.com/mapbox/protozero && cd protozero && CC=afl-clang-lto CXX=afl-clang-lto++ AFL_USE_ASAN=1 cmake ../ && make -j`

Environment
```
Ubuntu clang version 14.0.0-++20220108064110+2cafbcb560d9-1~exp1~20220108184211.222
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
```

```
llvm-config --version
14.0.0
```

```
Linux ams3-01 4.15.0-166-generic #174-Ubuntu SMP Wed Dec 8 19:07:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzVGtty4jj2a8iLyi7fMPCQB5qE2d4i3V2d9My8UbJ9DJq2Ja8sE5ivnyPJXIwJm_RlazuVGCOd-01HUhKR7W7_WLMCiJI7xldECZI0rMhISatEbAfBvJJCib9BikEwI89AgKei4QokZEStWU1YXTdAnplak7SgSGMQe37keq7nDIJ3-Bt4Qe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