Skip to content

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

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
}
15 changes: 15 additions & 0 deletions compiler-rt/test/sanitizer_common/TestCases/Linux/free_sized.c
Original file line number Diff line number Diff line change
@@ -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;
}
Loading