llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.14k stars 11.11k forks source link

3.7.1 rc2 / 38.0 rc1 - GNU/Linux: CodeGen/asan-globals.cpp fails on i386 #26085

Open sylvestre opened 8 years ago

sylvestre commented 8 years ago
Bugzilla Link 25711
Version 3.7
OS Linux
CC @kcc,@tstellar,@vitalybuka

Extended Description

**** TEST 'Clang :: CodeGen/asan-globals.cpp' FAILED **** Script:

echo "int extra_global;" > /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.extra-source.cpp echo "global:blacklisted_global" > /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.blacklist /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/Release/bin/clang -cc1 -internal-isystem /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/Release/bin/../lib/clang/3.7.1/include -nostdsysteminc -include /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.extra-source.cpp -fsanitize=address -fsanitize-blacklist=/«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.blacklist -emit-llvm -o - /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/clang/test/CodeGen/asan-globals.cpp | /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/Release/bin/FileCheck /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/clang/test/CodeGen/asan-globals.cpp echo "src:/«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/clang/test/CodeGen/asan-globals.cpp" > /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.blacklist-src /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/Release/bin/clang -cc1 -internal-isystem /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/Release/bin/../lib/clang/3.7.1/include -nostdsysteminc -include /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.extra-source.cpp -fsanitize=address -fsanitize-blacklist=/«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.blacklist-src -emit-llvm -o - /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/clang/test/CodeGen/asan-globals.cpp | /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/build-llvm/Release/bin/FileCheck /«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/clang/test/CodeGen/asan-globals.cpp --check-prefix=BLACKLIST-SRC

Exit Code: 1

Command Output (stderr):

/«BUILDDIR»/llvm-toolchain-3.7-3.7.1~+rc2/clang/test/CodeGen/asan-globals.cpp:33:19: error: expected string not found in input // BLACKLIST-SRC: ![[GLOBAL]] = !{{{.*}} null, null, i1 false, i1 true} ^

:206:1: note: scanning from here !​2 = !{i32* getelementptr inbounds ({ i32, [60 x i8] }, { i32, [60 x i8] }* @​global, i32 0, i32 0), !​3, !"global", i1 false, i1 false} ^ :206:1: note: with variable "GLOBAL" equal to "2" !​2 = !{i32* getelementptr inbounds ({ i32, [60 x i8] }, { i32, [60 x i8] }* @​global, i32 0, i32 0), !​3, !"global", i1 false, i1 false} ^ :206:97: note: possible intended match here !​2 = !{i32* getelementptr inbounds ({ i32, [60 x i8] }, { i32, [60 x i8] }* @​global, i32 0, i32 0), !​3, !"global", i1 false, i1 false} ^ --
vitalybuka commented 6 years ago

Is this still reproducible?

sylvestre commented 8 years ago

Full output .//build-llvm/./bin/clang -cc1 -internal-isystem .//bui ld-llvm/bin/../lib/clang/3.8.0/include -nostdsysteminc -include .//build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.extra-source.cpp -fsanitize=address -fsanitize-blacklist=.//build-llvm/tools/clang/test/CodeGen/Output/asan-globals.cpp.tmp.blacklist-src -emit-llvm -o - .//clang/test/CodeGen/asan-globals.cpp

tstellar commented 8 years ago

Also, do you think you could get the full output from the clang command. you can fust cut and paste the commands output by this test to execute them.

tstellar commented 8 years ago

How exactly do I reproduce it?

I've tried the following:

  • On an x86_64 Ubuntu 14.04
  • cmake -DCMAKE_BUILD_TYPE=Release -G Ninja $HOME/llvm -DLLVM_BUILD_32_BITS=1
  • ninja check-clang

I was also unable to reproduce this on debian stable 32-bit OS (with a 64-bit CPU). Sylvestre are you running on i386 HW?

kcc commented 8 years ago

How exactly do I reproduce it?

I've tried the following: