[compiler-rt] 228bea6 - Revert D106195 "[dfsan] Add wrappers for v*printf functions"
George Balatsouras via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 24 01:59:12 PDT 2021
Author: George Balatsouras
Date: 2021-07-24T08:53:48Z
New Revision: 228bea6a36cd0eb3b7f80d18bce9f8d5a1a69c95
URL: https://github.com/llvm/llvm-project/commit/228bea6a36cd0eb3b7f80d18bce9f8d5a1a69c95
DIFF: https://github.com/llvm/llvm-project/commit/228bea6a36cd0eb3b7f80d18bce9f8d5a1a69c95.diff
LOG: Revert D106195 "[dfsan] Add wrappers for v*printf functions"
This reverts commit bf281f364757d6af8d9d8456f26d334d1eeaf575.
This commit causes dfsan to segfault.
Added:
Modified:
compiler-rt/lib/dfsan/dfsan_custom.cpp
compiler-rt/lib/dfsan/done_abilist.txt
compiler-rt/test/dfsan/custom.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/dfsan/dfsan_custom.cpp b/compiler-rt/lib/dfsan/dfsan_custom.cpp
index edc07547ef329..3185184f29c8a 100644
--- a/compiler-rt/lib/dfsan/dfsan_custom.cpp
+++ b/compiler-rt/lib/dfsan/dfsan_custom.cpp
@@ -2460,49 +2460,6 @@ int __dfso_snprintf(char *str, size_t size, const char *format,
return ret;
}
-SANITIZER_INTERFACE_ATTRIBUTE
-int __dfsw_vsprintf(char *str, const char *format, dfsan_label str_label,
- dfsan_label format_label, dfsan_label *va_labels,
- dfsan_label *ret_label, va_list ap) {
- int ret = format_buffer(str, ~0ul, format, va_labels, ret_label, nullptr,
- nullptr, ap);
- return ret;
-}
-
-SANITIZER_INTERFACE_ATTRIBUTE
-int __dfso_vsprintf(char *str, const char *format, dfsan_label str_label,
- dfsan_label format_label, dfsan_label *va_labels,
- dfsan_label *ret_label, dfsan_origin str_origin,
- dfsan_origin format_origin, dfsan_origin *va_origins,
- dfsan_origin *ret_origin, va_list ap) {
- int ret = format_buffer(str, ~0ul, format, va_labels, ret_label, va_origins,
- ret_origin, ap);
- return ret;
-}
-
-SANITIZER_INTERFACE_ATTRIBUTE
-int __dfsw_vsnprintf(char *str, size_t size, const char *format,
- dfsan_label str_label, dfsan_label size_label,
- dfsan_label format_label, dfsan_label *va_labels,
- dfsan_label *ret_label, va_list ap) {
- int ret = format_buffer(str, size, format, va_labels, ret_label, nullptr,
- nullptr, ap);
- return ret;
-}
-
-SANITIZER_INTERFACE_ATTRIBUTE
-int __dfso_vsnprintf(char *str, size_t size, const char *format,
- dfsan_label str_label, dfsan_label size_label,
- dfsan_label format_label, dfsan_label *va_labels,
- dfsan_label *ret_label, dfsan_origin str_origin,
- dfsan_origin size_origin, dfsan_origin format_origin,
- dfsan_origin *va_origins, dfsan_origin *ret_origin,
- va_list ap) {
- int ret = format_buffer(str, size, format, va_labels, ret_label, va_origins,
- ret_origin, ap);
- return ret;
-}
-
static void BeforeFork() {
StackDepotLockAll();
GetChainedOriginDepot()->LockAll();
diff --git a/compiler-rt/lib/dfsan/done_abilist.txt b/compiler-rt/lib/dfsan/done_abilist.txt
index 4e4466e4eeb0e..3c2670e04c29c 100644
--- a/compiler-rt/lib/dfsan/done_abilist.txt
+++ b/compiler-rt/lib/dfsan/done_abilist.txt
@@ -286,8 +286,6 @@ fun:gettimeofday=custom
# sprintf-like
fun:sprintf=custom
fun:snprintf=custom
-fun:vsprintf=custom
-fun:vsnprintf=custom
# TODO: custom
fun:asprintf=discard
diff --git a/compiler-rt/test/dfsan/custom.cpp b/compiler-rt/test/dfsan/custom.cpp
index 8d1ef49e034db..99450a6c1e71a 100644
--- a/compiler-rt/test/dfsan/custom.cpp
+++ b/compiler-rt/test/dfsan/custom.cpp
@@ -1939,14 +1939,6 @@ void test_snprintf() {
ASSERT_LABEL(r, 0);
}
-// This is essentially the same as sprintf with the only
diff erence that it
-// uses a va_list instead of varargs. This empty function is here to appease
-// the check-wrappers script.
-void test_vsprintf() {}
-
-// Same here, but for snprintf.
-void test_vsnprintf() {}
-
// Tested by a seperate source file. This empty function is here to appease the
// check-wrappers script.
void test_fork() {}
@@ -2027,7 +2019,5 @@ int main(void) {
test_strtoul();
test_strtoull();
test_time();
- test_vsprintf();
- test_vsnprintf();
test_write();
}
More information about the llvm-commits
mailing list