[llvm-bugs] [Bug 51126] New: clang trunk/13.0 segfaults in mesa/aarch64

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 17 11:01:37 PDT 2021


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

            Bug ID: 51126
           Summary: clang trunk/13.0 segfaults in mesa/aarch64
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: raj.khem at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Created attachment 25031
  --> https://bugs.llvm.org/attachment.cgi?id=25031&action=edit
test case

clang trunk is crashing when cross compiling mesa for aarch64, it works ok for
other arches. Attached are the script + tescase

% sh /tmp/link_varyings-304361.sh                                              
                                                                               
                     [4/592]
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:
/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/recipe-sysroot-native/usr/bin/clang-13
-cc1 -triple aarch64-yoe-linux-musl -emit-obj -
-mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name link_varyings.cpp -mrelocation-model pic -pic-level 2
-fhalf-no-semantic-interposition -mframe-pointer=non-leaf -fno-rounding-math
-ffp-exception-behavior=ignore -mconstructor-aliases -munwind-tables
-target-cpu cortex-a72 -target-feature +neon -target-feature +crc
-target-feature +crypto -target-feature +sha2 -target-feature +aes -target-abi
aapcs -fallow-half-arguments-and-returns -debug-info-kind=limited
-dwarf-version=5 -debugger-tuning=gdb -ffunction-sections -fdata-sections
-fcoverage-compilation-dir=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/build
-sys-header-deps -D _FORTIFY_SOURCE=2 -D NDEBUG -D _FILE_OFFSET_BITS=64 -D
__STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D
PACKAGE_VERSION=\"21.1.4\" -D
PACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\" -D
ENABLE_ST_OMX_BELLAGIO=0 -D ENABLE_ST_OMX_TIZONIA=0 -D HAVE_X11_PLATFORM -D
HAVE_XCB_PLATFORM -D GLX_INDIRECT_RENDERING -D GLX_DIRECT_RENDERING -D
GLX_USE_DRM -D HAVE_DRM_PLATFORM -D ENABLE_SHADER_CACHE -D
HAVE___BUILTIN_BSWAP32 -D HAVE___BUILTIN_BSWAP64 -D HAVE___BUILTIN_CLZ -D
HAVE___BUILTIN_CLZLL -D HAVE___BUILTIN_CTZ -D HAVE___BUILTIN_EXPECT -D
HAVE___BUILTIN_FFS -D HAVE___BUILTIN_FFSLL -D HAVE___BUILTIN_POPCOUNT -D
HAVE___BUILTIN_POPCOUNTLL -D HAVE___BUILTIN_UNREACHABLE -D
HAVE___BUILTIN_TYPES_COMPATIBLE_P -D HAVE_FUNC_ATTRIBUTE_CONST -D
HAVE_FUNC_ATTRI
BUTE_FLATTEN -D HAVE_FUNC_ATTRIBUTE_MALLOC -D HAVE_FUNC_ATTRIBUTE_PURE -D
HAVE_FUNC_ATTRIBUTE_UNUSED -D HAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -D
HAVE_FUNC_ATTRIBUTE_WEAK -D HAVE_FUNC_ATTRIBUTE_FORMAT -D
HAVE_FUNC_ATTRIBUTE_PACKED -D HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -D
HAVE_FUNC_ATTRIBUTE_ALIAS -D HAVE_FUNC_ATTRIBUTE_NORETURN -D
HAVE_FUNC_ATTRIBUTE_VISIBILITY -D HAVE_UINT128 -D _GNU_SOURCE -D
USE_GCC_ATOMIC_BUILTINS -D USE_AARCH64_ASM -D MAJOR_IN_SYSMACROS -D
HAVE_LINUX_FUTEX_H -D HAVE_ENDIAN_H -D HAVE_DLFCN_H -D HAVE_SYS_SHM_H -D
HAVE_CET_H -D HAVE_STRTOF -D HAVE_MKOSTEMP -D HAVE_TIMESPEC_GET -D
HAVE_MEMFD_CREATE -D HAVE_FLOCK -D HAVE_STRTOK_R -D HAVE_GETRANDOM -D
HAVE_PROGRAM_INVOCATION_NAME -D HAVE_POSIX_MEMALIGN -D HAVE_DIRENT_D_TYPE -
D HAVE_STRTOD_L -D HAVE_DLADDR -D HAVE_DL_ITERATE_PHDR -D HAVE_ZLIB -D
HAVE_COMPRESSION -D HAVE_PTHREAD -D HAVE_PTHREAD_SETAFFINITY -D HAVE_LIBDRM -D
HAVE_WAYLAND_PLATFORM -D WL_HIDE_DEPRECATED -D HAVE_DRI3 -D HAVE_DRI3_MODIFIERS
-fmacro-prefix-map=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0=/usr/src/debug/mesa/2_21.1.4-r0
-O2 -Wformat -Wformat-security -Werror=format-security -Wall -Winvalid-pch
-Wnon-virtual-dtor -Werror=return-type -Werror=empty-body -Wno-non-virtual-dtor
-Wno-missing-field-initializers -Werror=format -Wformat-security
-Wno-microsoft-enum-value -Werror=pointer-arith -Werror=gnu-empty-initializer
-std=c++14 -fdeprecated-macro
-fdebug-compilation-dir=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/build
-fdebug-prefix-map=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0=/usr/src/debug/mesa/2_21.1.4-r0
-fdebug-prefix-map=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/recipe-sysroot=
-fdebug-prefix-map=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/recipe-sysroot-native=
-ferror-limit 19 -fvisibility hidden -fvisibility-inlines-hidden -pthread
-stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -fcxx-exceptions
-fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp
-target-feature +outline-atomics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++
link_varyings-304361.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'link_varyings-304361.cpp'.
4.      Running pass 'AArch64 Instruction Selection' on function
'@_ZL24assign_varying_locationsP10gl_contextPvP17gl_shader_programP16gl_linked_shaderS5_jP14tfeedback_declm'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH
or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/tmp/link_varyings-304361.sh: line 4: 2696557 Segmentation fault      (core
dumped)
"/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/recipe-sysroot-native/usr/bin/clang-13"
"-cc1" "-triple" "aarch64-yoe-linux-musl" "-emit-obj" "--mrelax-relocations"
"-disable-free" "-disable-llvm-verifier" "-discard-value-names"
"-main-file-name" "link_varyings.cpp" "-mrelocation-model" "pic" "-pic-level"
"2" "-fhalf-no-semantic-interposition" "-mframe-pointer=non-leaf"
"-fno-rounding-math" "-ffp-exception-behavior=ignore" "-mconstructor-aliases"
"-munwind-tables" "-target-cpu" "cortex-a72" "-target-feature" "+neon"
"-target-feature" "+crc" "-target-feature" "+crypto" "-target-feature" "+sha2"
"-target-feature" "+aes" "-target-abi" 
"aapcs" "-fallow-half-arguments-and-returns" "-debug-info-kind=limited"
"-dwarf-version=5" "-debugger-tuning=gdb" "-ffunction-sections"
"-fdata-sections"
"-fcoverage-compilation-dir=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/build"
"-sys-header-deps" "-D" "_FORTIFY_SOURCE=2" "-D" "NDEBUG" "-D"
"_FILE_OFFSET_BITS=64" "-D" "__STDC_CONSTANT_MACR
OS" "-D" "__STDC_FORMAT_MACROS" "-D" "__STDC_LIMIT_MACROS" "-D"
"PACKAGE_VERSION=\"21.1.4\"" "-D"
"PACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-D"
"ENABLE_ST_OMX_BELLAGIO=0" "-D" "ENABLE_ST_OMX_TIZONIA=0" "-D"
"HAVE_X11_PLATFORM" "-D" "HAVE_XCB_PLATFORM" "-D" "GLX_INDIRECT_RENDERING" "-D"
"GLX_DIRECT_RENDERING" "-D" "GLX_USE_DRM" "-D" "HAVE_DRM_PLATFORM" "-D"
"ENABLE_SHADER_CACHE" "-D" "HAVE___BUILTIN_BSWAP32" "-D"
"HAVE___BUILTIN_BSWAP64" "-D" "HAVE___BUILTIN_CLZ" "-D" "HAVE___BUILTIN_CLZLL"
"-D" "HAVE___BUILTIN_CTZ" "-D" "HAVE___BUILTIN_EXPECT" "-D"
"HAVE___BUILTIN_FFS" "-D" "HAVE___BUILTIN_FFSLL" "-D" "HAVE___BUILTIN_POPCOUNT"
"-D" "HAVE___BUILTIN_POPCOUNTLL" "-D" "HAVE___BUILTIN_UNREACHABLE" "-D"
"HAVE___BUILTIN_TYPES_COMPATIBLE_P" "-D" "HAVE_FUNC_ATTRIBUTE_CONST" "-D"
"HAVE_FUNC_ATTRIBUTE_FLATTEN" "-D" "HAVE_FUNC_ATTRIBUTE_MALLOC" "-D"
"HAVE_FUNC_ATTRIBUTE_PURE" "-D" "HAVE_FUNC_ATTRIBUTE_UNUS
ED" "-D" "HAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-D"
"HAVE_FUNC_ATTRIBUTE_WEAK" "-D" "HAVE_FUNC_ATTRIBUTE_FORMAT" "-D"
"HAVE_FUNC_ATTRIBUTE_PACKED" "-D" "HAVE_FUNC_ATTRIBUTE_RETURNS_NONN
ULL" "-D" "HAVE_FUNC_ATTRIBUTE_ALIAS" "-D" "HAVE_FUNC_ATTRIBUTE_NORETURN" "-D"
"HAVE_FUNC_ATTRIBUTE_VISIBILITY" "-D" "HAVE_UINT128" "-D" "_GNU_SOURCE" "-D"
"USE_GCC_ATOMIC_BUILTINS" "-D" "
USE_AARCH64_ASM" "-D" "MAJOR_IN_SYSMACROS" "-D" "HAVE_LINUX_FUTEX_H" "-D"
"HAVE_ENDIAN_H" "-D" "HAVE_DLFCN_H" "-D" "HAVE_SYS_SHM_H" "-D" "HAVE_CET_H"
"-D" "HAVE_STRTOF" "-D" "HAVE_MKOSTEMP
" "-D" "HAVE_TIMESPEC_GET" "-D" "HAVE_MEMFD_CREATE" "-D" "HAVE_FLOCK" "-D"
"HAVE_STRTOK_R" "-D" "HAVE_GETRANDOM" "-D" "HAVE_PROGRAM_INVOCATION_NAME" "-D"
"HAVE_POSIX_MEMALIGN" "-D" "HAVE_D
IRENT_D_TYPE" "-D" "HAVE_STRTOD_L" "-D" "HAVE_DLADDR" "-D"
"HAVE_DL_ITERATE_PHDR" "-D" "HAVE_ZLIB" "-D" "HAVE_COMPRESSION" "-D"
"HAVE_PTHREAD" "-D" "HAVE_PTHREAD_SETAFFINITY" "-D" "HAVE_LI
BDRM" "-D" "HAVE_WAYLAND_PLATFORM" "-D" "WL_HIDE_DEPRECATED" "-D" "HAVE_DRI3"
"-D" "HAVE_DRI3_MODIFIERS"
"-fmacro-prefix-map=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/
2_21.1.4-r0=/usr/src/debug/mesa/2_21.1.4-r0" "-O2" "-Wformat"
"-Wformat-security" "-Werror=format-security" "-Wall" "-Winvalid-pch"
"-Wnon-virtual-dtor" "-Werror=return-type" "-Werror=empt
y-body" "-Wno-non-virtual-dtor" "-Wno-missing-field-initializers"
"-Werror=format" "-Wformat-security" "-Wno-microsoft-enum-value"
"-Werror=pointer-arith" "-Werror=gnu-empty-initializer" "
-std=c++14" "-fdeprecated-macro"
"-fdebug-compilation-dir=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/build"
"-fdebug-prefix-map=/mnt/b/yoe/master/build/tmp/
work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0=/usr/src/debug/mesa/2_21.1.4-r0"
"-fdebug-prefix-map=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/recipe-sysroo
t="
"-fdebug-prefix-map=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/mesa/2_21.1.4-r0/recipe-sysroot-native="
"-ferror-limit" "19" "-fvisibility" "hidden" "-fvisibility-inlins-hidden"
"-pthread" "-stack-protector" "2" "-fno-signed-char" "-fgnuc-version=4.2.1"
"-fcxx-exceptions" "-fexceptions" "-fcolor-diagnostics" "-vectorize-loops"
"-vectorize-slp" "-target-f
eature" "+outline-atomics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x"
"c++" "link_varyings-304361.cpp"

-- 
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/20210717/422d077f/attachment-0001.html>


More information about the llvm-bugs mailing list