-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-libc Author: Daniel Thornburgh (mysterymath) ChangesFixes #122367 Full diff: https://github.com/llvm/llvm-project/pull/136634.diff 6 Files Affected:
diff --git a/libc/fuzzing/__support/CMakeLists.txt b/libc/fuzzing/__support/CMakeLists.txt
index 7742ee43860d5..cfe51605ed2aa 100644
--- a/libc/fuzzing/__support/CMakeLists.txt
+++ b/libc/fuzzing/__support/CMakeLists.txt
@@ -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
diff --git a/libc/fuzzing/__support/fake_heap.s b/libc/fuzzing/__support/fake_heap.s
deleted file mode 100644
index 69522f53c8b1f..0000000000000
--- a/libc/fuzzing/__support/fake_heap.s
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- Test fake definition for heap symbols -----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-.globl _end, __llvm_libc_heap_limit
-
-.bss
-_end:
-.fill 1024
-__llvm_libc_heap_limit:
-
diff --git a/libc/fuzzing/__support/freelist_heap_fuzz.cpp b/libc/fuzzing/__support/freelist_heap_fuzz.cpp
index d152d0f35499f..7b7985a83c3e6 100644
--- a/libc/fuzzing/__support/freelist_heap_fuzz.cpp
+++ b/libc/fuzzing/__support/freelist_heap_fuzz.cpp
@@ -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;
diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt
index b50bf245f202c..c1736c8fe59e2 100644
--- a/libc/test/src/__support/CMakeLists.txt
+++ b/libc/test/src/__support/CMakeLists.txt
@@ -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
diff --git a/libc/test/src/__support/fake_heap.s b/libc/test/src/__support/fake_heap.s
deleted file mode 100644
index 69522f53c8b1f..0000000000000
--- a/libc/test/src/__support/fake_heap.s
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- Test fake definition for heap symbols -----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-.globl _end, __llvm_libc_heap_limit
-
-.bss
-_end:
-.fill 1024
-__llvm_libc_heap_limit:
-
diff --git a/libc/test/src/__support/freelist_heap_test.cpp b/libc/test/src/__support/freelist_heap_test.cpp
index 0623272dd5b9f..93e23619661a0 100644
--- a/libc/test/src/__support/freelist_heap_test.cpp
+++ b/libc/test/src/__support/freelist_heap_test.cpp
@@ -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;
|
petrhosek
approved these changes
Apr 22, 2025
michaelrj-google
approved these changes
Apr 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine, I assume it's target agnostic and test only.
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #122367