aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-29 02:47:23 +0000
committerSam James <sam@gentoo.org>2023-01-29 08:50:26 +0000
commit9e2e3b4fd87a92e5b8d379e3312a57c6986f9004 (patch)
tree1f2f31955d3b9d812ff4b82b9368f76cb02c8ecb
parent11.4.0: shift libssp patch out of nocross (diff)
downloadgcc-patches-9e2e3b4f.tar.gz
gcc-patches-9e2e3b4f.tar.bz2
gcc-patches-9e2e3b4f.zip
12.2.0: drop upstreamed 76_all_driver_environ_putenv_PR106624.patch
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--12.2.0/gentoo/76_all_driver_environ_putenv_PR106624.patch44
-rw-r--r--12.2.0/gentoo/README.history3
2 files changed, 3 insertions, 44 deletions
diff --git a/12.2.0/gentoo/76_all_driver_environ_putenv_PR106624.patch b/12.2.0/gentoo/76_all_driver_environ_putenv_PR106624.patch
deleted file mode 100644
index 16fb131..0000000
--- a/12.2.0/gentoo/76_all_driver_environ_putenv_PR106624.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://bugs.gentoo.org/885501
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106624
-https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2b403297b111c990c331b5bbb6165b061ad2259b
-
-From 2b403297b111c990c331b5bbb6165b061ad2259b Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <siarheit@google.com>
-Date: Tue, 16 Aug 2022 12:35:07 +0100
-Subject: [PATCH 1/1] driver: fix environ corruption after putenv() [PR106624]
-
-The bug appeared afte r13-2010-g1270ccda70ca09 "Factor out
-jobserver_active_p" slightly changed `putenv()` use from allocating
-to non-allocating:
-
- -xputenv (concat ("MAKEFLAGS=", dup, NULL));
- +xputenv (jinfo.skipped_makeflags.c_str ());
-
-`xputenv()` (and `putenv()`) don't copy strings and only store the
-pointer in the `environ` global table. As a result `environ` got
-corrupted as soon as `jinfo.skipped_makeflags` store got deallocated.
-
-This started causing bootstrap crashes in `execv()` calls:
-
- xgcc: fatal error: cannot execute '/build/build/./prev-gcc/collect2': execv: Bad address
-
-The change restores memory allocation for `xputenv()` argument.
-
-gcc/
-
- PR driver/106624
- * gcc.cc (driver::detect_jobserver): Allocate storage xputenv()
- argument using xstrdup().
---- a/gcc/gcc.cc
-+++ b/gcc/gcc.cc
-@@ -9182,7 +9182,7 @@ driver::detect_jobserver () const
- {
- jobserver_info jinfo;
- if (!jinfo.is_active && !jinfo.skipped_makeflags.empty ())
-- xputenv (jinfo.skipped_makeflags.c_str ());
-+ xputenv (xstrdup (jinfo.skipped_makeflags.c_str ()));
- }
-
- /* Determine what the exit code of the driver should be. */
---
-2.31.1
diff --git a/12.2.0/gentoo/README.history b/12.2.0/gentoo/README.history
index e3e0bf4..940ed88 100644
--- a/12.2.0/gentoo/README.history
+++ b/12.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+11 29 Jan 2022
+ - 76_all_driver_environ_putenv_PR106624.patch
+
10 23 Jan 2022
+ 76_all_driver_environ_putenv_PR106624.patch