-
Notifications
You must be signed in to change notification settings - Fork 14.3k
sanitizer_common: add unsupported test for free_sized and free_aligned_sized from C23 #144727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sanitizer_common: add unsupported test for free_sized and free_aligned_sized from C23 #144727
Conversation
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Justin King (jcking) ChangesFull diff: https://github.com/llvm/llvm-project/pull/144727.diff 2 Files Affected:
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/free_aligned_sized.c b/compiler-rt/test/sanitizer_common/TestCases/Linux/free_aligned_sized.c
new file mode 100644
index 0000000000000..27cc8752f2841
--- /dev/null
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/free_aligned_sized.c
@@ -0,0 +1,13 @@
+// RUN: %clang -std=c23 -O0 %s -o %t && %run %t
+// UNSUPPORTED: asan, hwasan, rtsan, tsan, msan, lsan, ubsan
+
+#include <stddef.h>
+#include <stdlib.h>
+
+extern void free_aligned_sized(void* p, size_t alignment, size_t size);
+
+int main() {
+ volatile void *p = aligned_alloc(128, 1024);
+ free_aligned_sized((void*)p, 128, 1024);
+ return 0;
+}
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/free_sized.c b/compiler-rt/test/sanitizer_common/TestCases/Linux/free_sized.c
new file mode 100644
index 0000000000000..b3a469b838694
--- /dev/null
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/free_sized.c
@@ -0,0 +1,15 @@
+// RUN: %clang -std=c23 -O0 %s -o %t && %run %t
+// UNSUPPORTED: asan, hwasan, rtsan, tsan, msan, lsan, ubsan
+
+#include <stddef.h>
+#include <stdlib.h>
+
+extern void *aligned_alloc(size_t alignment, size_t size);
+
+extern void free_sized(void* p, size_t size);
+
+int main() {
+ volatile void *p = malloc(64);
+ free_sized((void*)p, 64);
+ return 0;
+}
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
…d_sized from C23 Signed-off-by: Justin King <[email protected]>
1c55a82
to
0688a6c
Compare
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/7612 Here is the relevant piece of the build log for the reference
|
For #144435