[Bug 279560] FreeBSD 14.1 ships libc++ which passes wrong size to sized operator delete

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 07 Jun 2024 18:21:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279560

--- Comment #2 from Aliaksei Kandratsenka <alkondratenko@gmail.com> ---
Here is reproduction independent from gperftools. There is likely even simpler
reproduction as I haven't looked deeper what gtest bits are doing, but they
seem to be doing just general STL bits. Also please note that we're making it a
bug by passing -fsized-deallocation to clang.

* clone https://github.com/google/googletest
* cd googletest
* grab https://gist.github.com/alk/f73d13f73d47deaca3921cb8d7660bf2
* then run:

c++ -o tt -pthread -std=gnu++17 -Wall -fsized-deallocation -Og -ggdb3
-Igoogletest/include -Igoogletest trivial-sized-test.cc
googletest/src/gtest_main.cc googletest/src/gtest-assertion-result.cc
googletest/src/gtest-death-test.cc googletest/src/gtest-filepath.cc
googletest/src/gtest-matchers.cc googletest/src/gtest-port.cc
googletest/src/gtest-printers.cc googletest/src/gtest-test-part.cc
googletest/src/gtest-typed-test.cc googletest/src/gtest.cc

It fails on my freebsd 14.1 VM (x64).

-- 
You are receiving this mail because:
You are the assignee for the bug.