Skip to content

[libc] Fix warnings for freelist_heap_test/fuzz #136634

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
Apr 22, 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
1 change: 0 additions & 1 deletion libc/fuzzing/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_GPU)
add_libc_fuzzer(
freelist_heap_fuzz
SRCS
fake_heap.s
freelist_heap_fuzz.cpp
DEPENDS
libc.src.__support.freelist_heap
Expand Down
15 changes: 0 additions & 15 deletions libc/fuzzing/__support/fake_heap.s

This file was deleted.

9 changes: 9 additions & 0 deletions libc/fuzzing/__support/freelist_heap_fuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
#include "src/string/memory_utils/inline_memmove.h"
#include "src/string/memory_utils/inline_memset.h"

asm(R"(
.globl _end, __llvm_libc_heap_limit

.bss
_end:
.fill 1024
__llvm_libc_heap_limit:
)";

using LIBC_NAMESPACE::FreeListHeap;
using LIBC_NAMESPACE::inline_memset;
using LIBC_NAMESPACE::cpp::nullopt;
Expand Down
1 change: 0 additions & 1 deletion libc/test/src/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_GPU)
SUITE
libc-support-tests
SRCS
fake_heap.s
freelist_heap_test.cpp
DEPENDS
libc.src.__support.CPP.span
Expand Down
15 changes: 0 additions & 15 deletions libc/test/src/__support/fake_heap.s

This file was deleted.

9 changes: 9 additions & 0 deletions libc/test/src/__support/freelist_heap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
#include "src/string/memcpy.h"
#include "test/UnitTest/Test.h"

asm(R"(
.globl _end, __llvm_libc_heap_limit

.bss
_end:
.fill 1024
__llvm_libc_heap_limit:
)");

using LIBC_NAMESPACE::Block;
using LIBC_NAMESPACE::freelist_heap;
using LIBC_NAMESPACE::FreeListHeap;
Expand Down
Loading