From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BBFEA15800F for ; Fri, 27 Jan 2023 08:12:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 158C2E09C0; Fri, 27 Jan 2023 08:12:14 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0A68E09C0 for ; Fri, 27 Jan 2023 08:12:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2B8EA3410CB for ; Fri, 27 Jan 2023 08:12:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6E383828 for ; Fri, 27 Jan 2023 08:12:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1674807088.15f41a07367e1aba2646c9c9883502c927da8d15.sam@gentoo> Subject: [gentoo-commits] proj/gcc-patches:master commit in: 10.5.0/gentoo/ X-VCS-Repository: proj/gcc-patches X-VCS-Files: 10.5.0/gentoo/77_all_driver_environ_putenv_PR106624.patch 10.5.0/gentoo/README.history X-VCS-Directories: 10.5.0/gentoo/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 15f41a07367e1aba2646c9c9883502c927da8d15 X-VCS-Branch: master Date: Fri, 27 Jan 2023 08:12:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bc5741f5-fe03-4261-8a25-c4d8ec70a040 X-Archives-Hash: 1eb09507c38c89da16ee863d23191597 commit: 15f41a07367e1aba2646c9c9883502c927da8d15 Author: Sam James gentoo org> AuthorDate: Fri Jan 27 08:11:28 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jan 27 08:11:28 2023 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=15f41a07 10.5.0: drop upstreamed 77_all_driver_environ_putenv_PR106624.patch Signed-off-by: Sam James gentoo.org> .../77_all_driver_environ_putenv_PR106624.patch | 44 ---------------------- 10.5.0/gentoo/README.history | 3 ++ 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/10.5.0/gentoo/77_all_driver_environ_putenv_PR106624.patch b/10.5.0/gentoo/77_all_driver_environ_putenv_PR106624.patch deleted file mode 100644 index baad63a..0000000 --- a/10.5.0/gentoo/77_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 -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.c (driver::detect_jobserver): Allocate storage xputenv() - argument using xstrdup(). ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -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/10.5.0/gentoo/README.history b/10.5.0/gentoo/README.history index d721532..74ee905 100644 --- a/10.5.0/gentoo/README.history +++ b/10.5.0/gentoo/README.history @@ -1,3 +1,6 @@ +5 27 Jan 2022 + - 77_all_driver_environ_putenv_PR106624.patch + 4 23 Jan 2022 + 77_all_driver_environ_putenv_PR106624.patch