Skip to content

Conversation

@dsandersllvm
Copy link
Collaborator

Some machines have read-only vtables but this test expects to overwrite them Use -no_data_const to ensure the vtable is writable

Some machines have read-only vtables but this test expects to overwrite them
Use -no_data_const to ensure the vtable is writable
@llvmbot
Copy link
Member

llvmbot commented Oct 23, 2025

@llvm/pr-subscribers-lldb

Author: Daniel Sanders (dsandersllvm)

Changes

Some machines have read-only vtables but this test expects to overwrite them Use -no_data_const to ensure the vtable is writable


Full diff: https://github.com/llvm/llvm-project/pull/164910.diff

1 Files Affected:

  • (modified) lldb/test/API/functionalities/vtable/Makefile (+6)
diff --git a/lldb/test/API/functionalities/vtable/Makefile b/lldb/test/API/functionalities/vtable/Makefile
index 99998b20bcb05..cbd7d472fb768 100644
--- a/lldb/test/API/functionalities/vtable/Makefile
+++ b/lldb/test/API/functionalities/vtable/Makefile
@@ -1,3 +1,9 @@
 CXX_SOURCES := main.cpp
 
+ifeq "$(OS)" "Darwin"
+    # Make vtables writable for test_overwrite_vtable test
+    # The -no_data_const flag prevents vtables from being placed in __DATA_CONST
+    LD_EXTRAS := -Wl,-no_data_const
+endif
+
 include Makefile.rules

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@bulbazord bulbazord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dsandersllvm dsandersllvm merged commit e903494 into llvm:main Oct 27, 2025
12 checks passed
@dsandersllvm dsandersllvm deleted the fixup-test_overwrite_vtable branch October 27, 2025 17:33
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
Some machines have read-only vtables but this test expects to overwrite
them. Use -no_data_const to ensure the vtable is writable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants