[libcxx-commits] [libcxx] DRAFT [libc++][hardening] In production hardening modes, trap rather than abort (PR #78561)

Konstantin Varlamov via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 19 00:30:49 PST 2024


================
@@ -90,55 +124,187 @@ struct AssertionInfoMatcher {
     std::size_t found_at = got_msg.find(msg_);
     if (found_at == std::string_view::npos)
       return false;
-    return found_at == 0 && got_msg.size() == msg_.size();
+    // Allow any match
+    return true;
----------------
var-const wrote:

At this point, I can't remember -- evidently, I wanted to allow partial matches for some reason. Looking at the original code, it's also confusing -- it seems to be just doing `==` in an unnecessarily verbose way. Replaced with a simple equality comparison.

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


More information about the libcxx-commits mailing list