public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gcc-patches:master commit in: 12.4.0/gentoo/
@ 2024-11-29  3:48 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-11-29  3:48 UTC (permalink / raw
  To: gentoo-commits

commit:     260bd9938ef500d0857de4f36ed3a72401fb12ee
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 29 03:47:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 29 03:47:37 2024 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=260bd993

12.4.0: cut patchset 2

Signed-off-by: Sam James <sam <AT> gentoo.org>

 12.4.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/12.4.0/gentoo/README.history b/12.4.0/gentoo/README.history
index 87a37fa..52e5c88 100644
--- a/12.4.0/gentoo/README.history
+++ b/12.4.0/gentoo/README.history
@@ -1,4 +1,4 @@
-2	????
+2	29 Nov 2024
 
 	- 78_all_PR115917-ada-lto.patch
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/gcc-patches:master commit in: 12.4.0/gentoo/
@ 2025-04-03 22:42 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-04-03 22:42 UTC (permalink / raw
  To: gentoo-commits

commit:     f8a816cd27b2104c2a34a7572e343cdfd6e984ac
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  3 22:41:31 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr  3 22:41:31 2025 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f8a816cd

12.4.0: drop 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch

Equivalent patch is now upstream.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...12_Wstringop-overread-libstdc++-cow-empty.patch | 63 ----------------------
 12.4.0/gentoo/README.history                       |  4 ++
 2 files changed, 4 insertions(+), 63 deletions(-)

diff --git a/12.4.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch b/12.4.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch
deleted file mode 100644
index 15241fe..0000000
--- a/12.4.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107087
-https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4969dcd2b7a94ce6c0d07225b21b5f3c040a4902
-
-From 4969dcd2b7a94ce6c0d07225b21b5f3c040a4902 Mon Sep 17 00:00:00 2001
-From: Jonathan Wakely <jwakely@redhat.com>
-Date: Fri, 31 Mar 2023 13:44:04 +0100
-Subject: [PATCH] libstdc++: Teach optimizer that empty COW strings are empty
- [PR107087]
-
-The compiler doesn't know about the invariant that the _S_empty_rep()
-object is immutable and so _M_length and _M_refcount are always zero.
-This means that we get warnings about writing possibly-non-zero length
-strings into buffers that can't hold them. If we teach the compiler that
-the empty rep is always zero length, it knows it can be copied into any
-buffer.
-
-For Stage 1 we might want to also consider adding this to capacity():
-
-	if (_S_empty_rep()._M_capacity != 0)
-	  __builtin_unreachable();
-
-And this to _Rep::_M_is_leaked() and _Rep::_M_is_shared():
-
-	  if (_S_empty_rep()._M_refcount != 0)
-	    __builtin_unreachable();
-
-libstdc++-v3/ChangeLog:
-
-	PR tree-optimization/107087
-	* include/bits/cow_string.h (basic_string::size()): Add
-	optimizer hint that _S_empty_rep()._M_length is always zero.
-	(basic_string::length()): Call size().
---- a/libstdc++-v3/include/bits/cow_string.h
-+++ b/libstdc++-v3/include/bits/cow_string.h
-@@ -907,17 +907,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- 
-     public:
-       // Capacity:
-+
-       ///  Returns the number of characters in the string, not including any
-       ///  null-termination.
-       size_type
-       size() const _GLIBCXX_NOEXCEPT
--      { return _M_rep()->_M_length; }
-+      {
-+#if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 && __OPTIMIZE__
-+	if (_S_empty_rep()._M_length != 0)
-+	  __builtin_unreachable();
-+#endif
-+	return _M_rep()->_M_length;
-+      }
- 
-       ///  Returns the number of characters in the string, not including any
-       ///  null-termination.
-       size_type
-       length() const _GLIBCXX_NOEXCEPT
--      { return _M_rep()->_M_length; }
-+      { return size(); }
- 
-       ///  Returns the size() of the largest possible %string.
-       size_type
--- 
-2.31.1

diff --git a/12.4.0/gentoo/README.history b/12.4.0/gentoo/README.history
index 52e5c88..d4f10c7 100644
--- a/12.4.0/gentoo/README.history
+++ b/12.4.0/gentoo/README.history
@@ -1,3 +1,7 @@
+3	3 April 2025
+
+	- 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch
+
 2	29 Nov 2024
 
 	- 78_all_PR115917-ada-lto.patch


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-03 22:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-29  3:48 [gentoo-commits] proj/gcc-patches:master commit in: 12.4.0/gentoo/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2025-04-03 22:42 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox