[llvm-commits] [compiler-rt] r169112 - in /compiler-rt/trunk/lib/ubsan: ./ lit_tests/Float/ lit_tests/Integer/ lit_tests/Misc/ lit_tests/TypeCheck/
Will Dietz
wdietz2 at illinois.edu
Sun Dec 2 10:43:34 PST 2012
Author: wdietz2
Date: Sun Dec 2 12:43:33 2012
New Revision: 169112
URL: http://llvm.org/viewvc/llvm-project?rev=169112&view=rev
Log:
[ubsan] Replace "fatal error" with "runtime error".
Modified:
compiler-rt/trunk/lib/ubsan/lit_tests/Float/cast-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/add-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-zero.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/incdec-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/mul-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/shift.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/sub-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uadd-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uincdec-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/umul-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Integer/usub-overflow.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Misc/missing_return.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Misc/unreachable.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/Misc/vla.c
compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/misaligned.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/null.cpp
compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp
compiler-rt/trunk/lib/ubsan/ubsan_diag.cc
compiler-rt/trunk/lib/ubsan/ubsan_handlers_cxx.cc
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Float/cast-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Float/cast-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Float/cast-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Float/cast-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -53,28 +53,28 @@
case '0':
// Note that values between 0x7ffffe00 and 0x80000000 may or may not
// successfully round-trip, depending on the rounding mode.
- // CHECK-0: fatal error: value 2.14748{{.*}} is outside the range of representable values of type 'int'
+ // CHECK-0: runtime error: value 2.14748{{.*}} is outside the range of representable values of type 'int'
return MaxFloatRepresentableAsInt + 0x80;
case '1':
- // CHECK-1: fatal error: value -2.14748{{.*}} is outside the range of representable values of type 'int'
+ // CHECK-1: runtime error: value -2.14748{{.*}} is outside the range of representable values of type 'int'
return MinFloatRepresentableAsInt - 0x100;
case '2':
- // CHECK-2: fatal error: value -0.001 is outside the range of representable values of type 'unsigned int'
+ // CHECK-2: runtime error: value -0.001 is outside the range of representable values of type 'unsigned int'
return (unsigned)-0.001;
case '3':
- // CHECK-3: fatal error: value 4.2949{{.*}} is outside the range of representable values of type 'unsigned int'
+ // CHECK-3: runtime error: value 4.2949{{.*}} is outside the range of representable values of type 'unsigned int'
return (unsigned)(MaxFloatRepresentableAsUInt + 0x100);
case '4':
- // CHECK-4: fatal error: value {{.*}} is outside the range of representable values of type 'int'
+ // CHECK-4: runtime error: value {{.*}} is outside the range of representable values of type 'int'
return Inf;
case '5':
- // CHECK-5: fatal error: value {{.*}} is outside the range of representable values of type 'int'
+ // CHECK-5: runtime error: value {{.*}} is outside the range of representable values of type 'int'
return NaN;
// Integer -> floating point overflow.
case '6':
- // CHECK-6: {{fatal error: value 0xffffff00000000000000000000000001 is outside the range of representable values of type 'float'|__int128 not supported}}
+ // CHECK-6: {{runtime error: value 0xffffff00000000000000000000000001 is outside the range of representable values of type 'float'|__int128 not supported}}
#ifdef __SIZEOF_INT128__
return (float)(FloatMaxAsUInt128 + 1);
#else
@@ -84,15 +84,15 @@
// FIXME: The backend cannot lower __fp16 operations on x86 yet.
//case '7':
// (__fp16)65504; // ok
- // // CHECK-7: fatal error: value 65505 is outside the range of representable values of type '__fp16'
+ // // CHECK-7: runtime error: value 65505 is outside the range of representable values of type '__fp16'
// return (__fp16)65505;
// Floating point -> floating point overflow.
case '8':
- // CHECK-8: fatal error: value 1e+39 is outside the range of representable values of type 'float'
+ // CHECK-8: runtime error: value 1e+39 is outside the range of representable values of type 'float'
return (float)1e39;
case '9':
- // CHECK-9: fatal error: value {{.*}} is outside the range of representable values of type 'double'
+ // CHECK-9: runtime error: value {{.*}} is outside the range of representable values of type 'double'
return (double)Inf;
}
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/add-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/add-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/add-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/add-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -13,7 +13,7 @@
#ifdef ADD_I32
int32_t k = 0x12345678;
k += 0x789abcde;
- // CHECK-ADD_I32: add-overflow.cpp:[[@LINE-1]]:5: fatal error: signed integer overflow: 305419896 + 2023406814 cannot be represented in type 'int32_t' (aka 'int')
+ // CHECK-ADD_I32: add-overflow.cpp:[[@LINE-1]]:5: runtime error: signed integer overflow: 305419896 + 2023406814 cannot be represented in type 'int32_t' (aka 'int')
#endif
#ifdef ADD_I64
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -5,6 +5,6 @@
int main() {
unsigned(0x80000000) / -1;
- // CHECK: div-overflow.cpp:9:23: fatal error: division of -2147483648 by -1 cannot be represented in type 'int'
+ // CHECK: div-overflow.cpp:9:23: runtime error: division of -2147483648 by -1 cannot be represented in type 'int'
int32_t(0x80000000) / -1;
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-zero.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-zero.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-zero.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/div-zero.cpp Sun Dec 2 12:43:33 2012
@@ -10,6 +10,6 @@
#endif
int main() {
- // CHECK: div-zero.cpp:[[@LINE+1]]:12: fatal error: division by zero
+ // CHECK: div-zero.cpp:[[@LINE+1]]:12: runtime error: division by zero
DIVIDEND / 0;
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/incdec-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/incdec-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/incdec-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/incdec-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -10,7 +10,7 @@
n++;
n++;
int m = -n - 1;
- // CHECK: incdec-overflow.cpp:15:3: fatal error: signed integer overflow: [[MINUS:-?]]214748364
+ // CHECK: incdec-overflow.cpp:15:3: runtime error: signed integer overflow: [[MINUS:-?]]214748364
// CHECK: + [[MINUS]]1 cannot be represented in type 'int'
OP;
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/mul-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/mul-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/mul-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/mul-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -9,6 +9,6 @@
(void)(uint16_t(0xffff) * int16_t(0x7fff));
(void)(uint16_t(0xffff) * uint16_t(0x8000));
- // CHECK: mul-overflow.cpp:13:27: fatal error: signed integer overflow: 65535 * 32769 cannot be represented in type 'int'
+ // CHECK: mul-overflow.cpp:13:27: runtime error: signed integer overflow: 65535 * 32769 cannot be represented in type 'int'
(void)(uint16_t(0xffff) * uint16_t(0x8001));
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -2,6 +2,6 @@
int main() {
-unsigned(-0x7fffffff - 1); // ok
- // CHECK: negate-overflow.cpp:6:10: fatal error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
+ // CHECK: negate-overflow.cpp:6:10: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
return -(-0x7fffffff - 1);
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/shift.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/shift.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/shift.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/shift.cpp Sun Dec 2 12:43:33 2012
@@ -20,18 +20,18 @@
b <<= 1; // still ok, unsigned
#ifdef LSH_OVERFLOW
- // CHECK-LSH_OVERFLOW: shift.cpp:24:5: fatal error: left shift of negative value -2147483648
+ // CHECK-LSH_OVERFLOW: shift.cpp:24:5: runtime error: left shift of negative value -2147483648
a OP 1;
#endif
#ifdef TOO_LOW
- // CHECK-TOO_LOW: shift.cpp:29:5: fatal error: shift exponent -3 is negative
+ // CHECK-TOO_LOW: shift.cpp:29:5: runtime error: shift exponent -3 is negative
a OP (-3);
#endif
#ifdef TOO_HIGH
a = 0;
- // CHECK-TOO_HIGH: shift.cpp:35:5: fatal error: shift exponent 32 is too large for 32-bit type 'int'
+ // CHECK-TOO_HIGH: shift.cpp:35:5: runtime error: shift exponent 32 is too large for 32-bit type 'int'
a OP 32;
#endif
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/sub-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/sub-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/sub-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/sub-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -12,7 +12,7 @@
#ifdef SUB_I32
(void)(int32_t(-2) - int32_t(0x7fffffff));
- // CHECK-SUB_I32: sub-overflow.cpp:[[@LINE-1]]:22: fatal error: signed integer overflow: -2 - 2147483647 cannot be represented in type 'int'
+ // CHECK-SUB_I32: sub-overflow.cpp:[[@LINE-1]]:22: runtime error: signed integer overflow: -2 - 2147483647 cannot be represented in type 'int'
#endif
#ifdef SUB_I64
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uadd-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uadd-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uadd-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uadd-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -13,7 +13,7 @@
#ifdef ADD_I32
uint32_t k = 0x87654321;
k += 0xedcba987;
- // CHECK-ADD_I32: uadd-overflow.cpp:[[@LINE-1]]:5: fatal error: unsigned integer overflow: 2271560481 + 3989547399 cannot be represented in type 'uint32_t' (aka 'unsigned int')
+ // CHECK-ADD_I32: uadd-overflow.cpp:[[@LINE-1]]:5: runtime error: unsigned integer overflow: 2271560481 + 3989547399 cannot be represented in type 'uint32_t' (aka 'unsigned int')
#endif
#ifdef ADD_I64
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uincdec-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uincdec-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uincdec-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/uincdec-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -10,7 +10,7 @@
n++;
n++;
unsigned m = 0;
- // CHECK-INC: uincdec-overflow.cpp:15:3: fatal error: unsigned integer overflow: 4294967295 + 1 cannot be represented in type 'unsigned int'
- // CHECK-DEC: uincdec-overflow.cpp:15:3: fatal error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int'
+ // CHECK-INC: uincdec-overflow.cpp:15:3: runtime error: unsigned integer overflow: 4294967295 + 1 cannot be represented in type 'unsigned int'
+ // CHECK-DEC: uincdec-overflow.cpp:15:3: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int'
OP;
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/umul-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/umul-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/umul-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/umul-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -13,7 +13,7 @@
(void)(uint16_t(0xffff) * uint16_t(0x8001));
(void)(uint32_t(0xffffffff) * uint32_t(0x2));
- // CHECK: umul-overflow.cpp:15:31: fatal error: unsigned integer overflow: 4294967295 * 2 cannot be represented in type 'unsigned int'
+ // CHECK: umul-overflow.cpp:15:31: runtime error: unsigned integer overflow: 4294967295 * 2 cannot be represented in type 'unsigned int'
return 0;
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Integer/usub-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/usub-overflow.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/usub-overflow.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/usub-overflow.cpp Sun Dec 2 12:43:33 2012
@@ -12,7 +12,7 @@
#ifdef SUB_I32
(void)(uint32_t(1) - uint32_t(2));
- // CHECK-SUB_I32: usub-overflow.cpp:[[@LINE-1]]:22: fatal error: unsigned integer overflow: 1 - 2 cannot be represented in type 'unsigned int'
+ // CHECK-SUB_I32: usub-overflow.cpp:[[@LINE-1]]:22: runtime error: unsigned integer overflow: 1 - 2 cannot be represented in type 'unsigned int'
#endif
#ifdef SUB_I64
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Misc/missing_return.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Misc/missing_return.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Misc/missing_return.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Misc/missing_return.cpp Sun Dec 2 12:43:33 2012
@@ -1,6 +1,6 @@
// RUN: %clang -fsanitize=return %s -O3 -o %t && %t 2>&1 | FileCheck %s
-// CHECK: missing_return.cpp:4:5: fatal error: execution reached the end of a value-returning function without returning a value
+// CHECK: missing_return.cpp:4:5: runtime error: execution reached the end of a value-returning function without returning a value
int f() {
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Misc/unreachable.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Misc/unreachable.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Misc/unreachable.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Misc/unreachable.cpp Sun Dec 2 12:43:33 2012
@@ -1,6 +1,6 @@
// RUN: %clang -fsanitize=unreachable %s -O3 -o %t && %t 2>&1 | FileCheck %s
int main(int, char **argv) {
- // CHECK: unreachable.cpp:5:3: fatal error: execution reached a __builtin_unreachable() call
+ // CHECK: unreachable.cpp:5:3: runtime error: execution reached a __builtin_unreachable() call
__builtin_unreachable();
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/Misc/vla.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Misc/vla.c?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/Misc/vla.c (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/Misc/vla.c Sun Dec 2 12:43:33 2012
@@ -4,8 +4,8 @@
// RUN: %t a b
int main(int argc, char **argv) {
- // CHECK-MINUS-ONE: vla.c:9:11: fatal error: variable length array bound evaluates to non-positive value -1
- // CHECK-ZERO: vla.c:9:11: fatal error: variable length array bound evaluates to non-positive value 0
+ // CHECK-MINUS-ONE: vla.c:9:11: runtime error: variable length array bound evaluates to non-positive value -1
+ // CHECK-ZERO: vla.c:9:11: runtime error: variable length array bound evaluates to non-positive value 0
int arr[argc - 2];
return 0;
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/misaligned.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/misaligned.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/misaligned.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/misaligned.cpp Sun Dec 2 12:43:33 2012
@@ -22,21 +22,21 @@
switch (argv[1][0]) {
case 'l':
- // CHECK-LOAD: misaligned.cpp:26:12: fatal error: load of misaligned address 0x{{[0-9a-f]*}} for type 'int', which requires 4 byte alignment
+ // CHECK-LOAD: misaligned.cpp:26:12: runtime error: load of misaligned address 0x{{[0-9a-f]*}} for type 'int', which requires 4 byte alignment
return *p;
case 's':
- // CHECK-STORE: misaligned.cpp:29:5: fatal error: store to misaligned address 0x{{[0-9a-f]*}} for type 'int', which requires 4 byte alignment
+ // CHECK-STORE: misaligned.cpp:29:5: runtime error: store to misaligned address 0x{{[0-9a-f]*}} for type 'int', which requires 4 byte alignment
*p = 1;
break;
case 'r':
- // CHECK-REFERENCE: misaligned.cpp:33:15: fatal error: reference binding to misaligned address 0x{{[0-9a-f]*}} for type 'int', which requires 4 byte alignment
+ // CHECK-REFERENCE: misaligned.cpp:33:15: runtime error: reference binding to misaligned address 0x{{[0-9a-f]*}} for type 'int', which requires 4 byte alignment
{int &r = *p;}
break;
case 'm':
- // CHECK-MEMBER: misaligned.cpp:37:15: fatal error: member access within misaligned address 0x{{[0-9a-f]*}} for type 'S', which requires 4 byte alignment
+ // CHECK-MEMBER: misaligned.cpp:37:15: runtime error: member access within misaligned address 0x{{[0-9a-f]*}} for type 'S', which requires 4 byte alignment
return s->k;
case 'f':
- // CHECK-MEMFUN: misaligned.cpp:40:12: fatal error: member call on misaligned address 0x{{[0-9a-f]*}} for type 'S', which requires 4 byte alignment
+ // CHECK-MEMFUN: misaligned.cpp:40:12: runtime error: member call on misaligned address 0x{{[0-9a-f]*}} for type 'S', which requires 4 byte alignment
return s->f();
}
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/null.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/null.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/null.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/null.cpp Sun Dec 2 12:43:33 2012
@@ -18,21 +18,21 @@
switch (argv[1][0]) {
case 'l':
- // CHECK-LOAD: null.cpp:22:12: fatal error: load of null pointer of type 'int'
+ // CHECK-LOAD: null.cpp:22:12: runtime error: load of null pointer of type 'int'
return *p;
case 's':
- // CHECK-STORE: null.cpp:25:5: fatal error: store to null pointer of type 'int'
+ // CHECK-STORE: null.cpp:25:5: runtime error: store to null pointer of type 'int'
*p = 1;
break;
case 'r':
- // CHECK-REFERENCE: null.cpp:29:15: fatal error: reference binding to null pointer of type 'int'
+ // CHECK-REFERENCE: null.cpp:29:15: runtime error: reference binding to null pointer of type 'int'
{int &r = *p;}
break;
case 'm':
- // CHECK-MEMBER: null.cpp:33:15: fatal error: member access within null pointer of type 'S'
+ // CHECK-MEMBER: null.cpp:33:15: runtime error: member access within null pointer of type 'S'
return s->k;
case 'f':
- // CHECK-MEMFUN: null.cpp:36:12: fatal error: member call on null pointer of type 'S'
+ // CHECK-MEMFUN: null.cpp:36:12: runtime error: member call on null pointer of type 'S'
return s->f();
}
}
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp Sun Dec 2 12:43:33 2012
@@ -64,14 +64,14 @@
switch (argv[1][0]) {
case 'r':
- // CHECK-REFERENCE: vptr.cpp:[[@LINE+1]]:13: fatal error: reference binding to address 0x{{[0-9a-f]*}} which does not point to an object of type 'T'
+ // CHECK-REFERENCE: vptr.cpp:[[@LINE+1]]:13: runtime error: reference binding to address 0x{{[0-9a-f]*}} which does not point to an object of type 'T'
{T &r = *p;}
break;
case 'm':
- // CHECK-MEMBER: vptr.cpp:[[@LINE+1]]:15: fatal error: member access within address 0x{{[0-9a-f]*}} which does not point to an object of type 'T'
+ // CHECK-MEMBER: vptr.cpp:[[@LINE+1]]:15: runtime error: member access within address 0x{{[0-9a-f]*}} which does not point to an object of type 'T'
return p->b;
case 'f':
- // CHECK-MEMFUN: vptr.cpp:[[@LINE+1]]:12: fatal error: member call on address 0x{{[0-9a-f]*}} which does not point to an object of type 'T'
+ // CHECK-MEMFUN: vptr.cpp:[[@LINE+1]]:12: runtime error: member call on address 0x{{[0-9a-f]*}} which does not point to an object of type 'T'
return p->g();
}
}
Modified: compiler-rt/trunk/lib/ubsan/ubsan_diag.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_diag.cc?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_diag.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_diag.cc Sun Dec 2 12:43:33 2012
@@ -60,7 +60,7 @@
}
if (UseAnsiColor)
RawWrite("\033[31m");
- RawWrite(" fatal error: ");
+ RawWrite(" runtime error: ");
if (UseAnsiColor)
RawWrite("\033[0;1m");
for (const char *Msg = Message; *Msg; ++Msg) {
Modified: compiler-rt/trunk/lib/ubsan/ubsan_handlers_cxx.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_handlers_cxx.cc?rev=169112&r1=169111&r2=169112&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_handlers_cxx.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_handlers_cxx.cc Sun Dec 2 12:43:33 2012
@@ -36,7 +36,7 @@
<< TypeCheckKinds[Data->TypeCheckKind] << (void*)Pointer << Data->Type;
// FIXME: If possible, say what type it actually points to. Produce a note
// pointing out the vptr:
- // lib/VMCore/Instructions.cpp:2020:10: fatal error: member call on address
+ // lib/VMCore/Instructions.cpp:2020:10: runtime error: member call on address
// 0xb7a4440 which does not point to an object of type
// 'llvm::OverflowingBinaryOperator'
// return cast<OverflowingBinaryOperator>(this)->hasNoSignedWrap();
More information about the llvm-commits
mailing list