[llvm-bugs] [Bug 43472] New: undefined behavior santizer compiler segfault __int128_t non-type template parameter

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 26 16:50:16 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43472

            Bug ID: 43472
           Summary: undefined behavior santizer compiler segfault
                    __int128_t non-type template parameter
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: patrick.a.moran at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 22583
  --> https://bugs.llvm.org/attachment.cgi?id=22583&action=edit
The preprocessed source of the repro

I'm encountering a segfault in the clang 9.0.0 compiler under code I've
attached:

 * It only manifests with -fsanitize=undefined
 * It only manifests at -O1 and up (not at -O0)
 * It only manifests when the template struct has a typename template parameter
and a non-type template parameter of that type.
 * It only manifests when the type argument is __int128_t
 * It only manifests when a static member function of the template class
returns an instance of the class **and** a function consumes the value
   * If you just cast the return of the static member function to void, the
issue does not reproduce.
 * It manifests at standards c++03, c++11, c++14, c++17 and c++2a.

The diagnostic message:

********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/test_fixed_point-11869e.cpp
clang-9: note: diagnostic msg: /tmp/test_fixed_point-11869e.sh
clang-9: note: diagnostic msg:

********************

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190926/6d621cc2/attachment-0001.html>


More information about the llvm-bugs mailing list