[llvm] [llubi] Global variables with simple initializers and global-address constants (PR #200547)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat May 30 00:59:48 PDT 2026


================
@@ -145,6 +145,12 @@ void ExecutorBase::store(const AnyValue &Ptr, Align Alignment,
         << "Invalid memory access via a pointer with nullary provenance.";
     return;
   }
+  if (MO->isConstant()) {
+    reportImmediateUB()
+        << "Try to write to a constant memory object at address 0x"
+        << Twine::utohexstr(PtrVal.address().getZExtValue()) << ".";
----------------
nikic wrote:

Can this use the usual provenance print instead (which includes the name of the object)?

https://github.com/llvm/llvm-project/pull/200547


More information about the llvm-commits mailing list