[compiler-rt] r217763 - Avoid calling strtoll and atoll in asan_str_test.cc on Windows for now
Ehsan Akhgari
ehsan.akhgari at gmail.com
Mon Sep 15 04:34:12 PDT 2014
Author: ehsan
Date: Mon Sep 15 06:34:12 2014
New Revision: 217763
URL: http://llvm.org/viewvc/llvm-project?rev=217763&view=rev
Log:
Avoid calling strtoll and atoll in asan_str_test.cc on Windows for now
Summary:
These two functions are unavailable on MSVC2012, which breaks building the
ASAN tests with MSVC2012. Since the tests required to run these functions
are disabled on Windows for now, avoid building them to fix the MSVC2012
builds.
Test Plan: This is needed in order to fix building the ASAN tests with MSVC2012.
Reviewers: timurrrr
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5343
Modified:
compiler-rt/trunk/lib/asan/tests/asan_str_test.cc
Modified: compiler-rt/trunk/lib/asan/tests/asan_str_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_str_test.cc?rev=217763&r1=217762&r2=217763&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_str_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_str_test.cc Mon Sep 15 06:34:12 2014
@@ -498,15 +498,6 @@ TEST(AddressSanitizer, StrArgsOverlapTes
free(str);
}
-void CallAtoi(const char *nptr) {
- Ident(atoi(nptr));
-}
-void CallAtol(const char *nptr) {
- Ident(atol(nptr));
-}
-void CallAtoll(const char *nptr) {
- Ident(atoll(nptr));
-}
typedef void(*PointerToCallAtoi)(const char*);
void RunAtoiOOBTest(PointerToCallAtoi Atoi) {
@@ -534,6 +525,15 @@ void RunAtoiOOBTest(PointerToCallAtoi At
}
#if !defined(_WIN32) // FIXME: Fix and enable on Windows.
+void CallAtoi(const char *nptr) {
+ Ident(atoi(nptr));
+}
+void CallAtol(const char *nptr) {
+ Ident(atol(nptr));
+}
+void CallAtoll(const char *nptr) {
+ Ident(atoll(nptr));
+}
TEST(AddressSanitizer, AtoiAndFriendsOOBTest) {
RunAtoiOOBTest(&CallAtoi);
RunAtoiOOBTest(&CallAtol);
@@ -541,12 +541,6 @@ TEST(AddressSanitizer, AtoiAndFriendsOOB
}
#endif
-void CallStrtol(const char *nptr, char **endptr, int base) {
- Ident(strtol(nptr, endptr, base));
-}
-void CallStrtoll(const char *nptr, char **endptr, int base) {
- Ident(strtoll(nptr, endptr, base));
-}
typedef void(*PointerToCallStrtol)(const char*, char**, int);
void RunStrtolOOBTest(PointerToCallStrtol Strtol) {
@@ -590,6 +584,12 @@ void RunStrtolOOBTest(PointerToCallStrto
}
#if !defined(_WIN32) // FIXME: Fix and enable on Windows.
+void CallStrtol(const char *nptr, char **endptr, int base) {
+ Ident(strtol(nptr, endptr, base));
+}
+void CallStrtoll(const char *nptr, char **endptr, int base) {
+ Ident(strtoll(nptr, endptr, base));
+}
TEST(AddressSanitizer, StrtollOOBTest) {
RunStrtolOOBTest(&CallStrtoll);
}
More information about the llvm-commits
mailing list