[llvm-bugs] [Bug 51154] New: [12 regression] error: unable to execute command: Segmentation fault (core dumped)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 21 07:09:54 PDT 2021


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

            Bug ID: 51154
           Summary: [12 regression] error: unable to execute command:
                    Segmentation fault (core dumped)
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: anbu1024.me 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

$ cat 10.c 

struct S
{
  char data[16];
};

struct S sx;

int y;

char z[((sizeof(0, ((sx, y)).data)) == (sizeof(char *))) ? (1) : (-1)];

char z[((sizeof(0, (sx = y).data)) == (sizeof(char *))) ? (1) : (-1)];

--------------------------------

$ clang-sp11 --version
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
0160ad802e899c2922bc9b29564080c22eb0908c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/tom/Documents/llvm/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin

--------------------------------

$ clang-sp11 10.c 
10.c:11:29: error: member reference base type 'int' is not a structure or union
char z[((sizeof(0, ((sx, y)).data)) == (sizeof(char *))) ? (1) : (-1)];
                   ~~~~~~~~~^~~~~
10.c:13:24: error: assigning to 'struct S' from incompatible type 'int'
char z[((sizeof(0, (sx = y).data)) == (sizeof(char *))) ? (1) : (-1)];
                       ^ ~
2 errors generated.

--------------------------------

$ clang-12 --version
clang version 12.0.0 (https://github.com/llvm/llvm-project/
b978a93635b584db380274d7c8963c73989944a1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin

--------------------------------

$ clang-12 10.c 
10.c:11:29: error: member reference base type 'int' is not a structure or union
char z[((sizeof(0, ((sx, y)).data)) == (sizeof(char *))) ? (1) : (-1)];
                   ~~~~~~~~~^~~~~
10.c:13:24: error: assigning to 'struct S' from incompatible type 'int'
char z[((sizeof(0, (sx = y).data)) == (sizeof(char *))) ? (1) : (-1)];
                       ^ ~
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments:
/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-12
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all
--mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name 10.c -mrelocation-model static -mframe-pointer=all -fmath-errno
-fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64
-tune-cpu generic -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir
/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/lib/clang/12.0.0
-internal-isystem /usr/local/include -internal-isystem
/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/lib/clang/12.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir
/media/Store/Project/C-compiler/ZSmith/data/bug-llvm-20210721/bug_dir/proc.0/deal
-ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -o
/tmp/10-54d374.o -x c 10.c
1.      10.c:13:70: current parser token ';'
#0 0x00000000024ab943 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-12+0x24ab943)
#1 0x00000000024a989e llvm::sys::RunSignalHandlers()
(/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-12+0x24a989e)
#2 0x00000000024abdef SignalHandler(int)
(/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-12+0x24abdef)
#3 0x00007f3017c7b3c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#4 0x00000000043fc561
clang::ASTContext::propertyTypesAreCompatible(clang::QualType, clang::QualType)
(/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-12+0x43fc561)
#5 0x0000000008ef55e8 
clang-12: error: unable to execute command: Segmentation fault (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 12.0.0 (https://github.com/llvm/llvm-project/
b978a93635b584db380274d7c8963c73989944a1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/tom/Documents/llvm/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin
clang-12: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/10-053b13.c
clang-12: note: diagnostic msg: /tmp/10-053b13.sh
clang-12: 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/20210721/f5865777/attachment-0001.html>


More information about the llvm-bugs mailing list