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 9B5D115838C for ; Tue, 16 Jan 2024 05:13:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5E0AE2B8C; Tue, 16 Jan 2024 05:13:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 4CB22E2B8C for ; Tue, 16 Jan 2024 05:13:37 +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 4EC3D343270 for ; Tue, 16 Jan 2024 05:13:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8C0B812C8 for ; Tue, 16 Jan 2024 05:13:34 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1705381013.a285f1f17dccd79968a63e5acc35b5230c236389.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: porting.h pspax.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: a285f1f17dccd79968a63e5acc35b5230c236389 X-VCS-Branch: master Date: Tue, 16 Jan 2024 05:13:34 +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: 782d7152-f0bf-42a2-95fc-e478121ba787 X-Archives-Hash: 061f460989ce0da74cba5ad172bcaedf commit: a285f1f17dccd79968a63e5acc35b5230c236389 Author: Mike Frysinger gentoo org> AuthorDate: Tue Jan 16 04:56:53 2024 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Jan 16 04:56:53 2024 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=a285f1f1 drop old __BOUNDS_CHECKING_ON support The out-of-tree patches for -fbounds-checking in GCC were great, but they haven't been updated since the gcc-4.0 days, and the sanitizer options have made it obsolete, so it's unlikely we'll ever use this code again. Signed-off-by: Mike Frysinger gentoo.org> porting.h | 7 ------- pspax.c | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/porting.h b/porting.h index 42c9ba3..3a544fa 100644 --- a/porting.h +++ b/porting.h @@ -77,13 +77,6 @@ #endif #undef PAX_UTILS_CLEANUP -/* bounds checking code will fart on free(NULL) even though that - * is valid usage. So let's wrap it if need be. - */ -#ifdef __BOUNDS_CHECKING_ON -# define free(ptr) do { if (ptr) free(ptr); } while (0) -# define PAX_UTILS_CLEANUP 1 -#endif /* LSAN (Leak Sanitizer) will complain about things we leak. */ #ifdef __SANITIZE_ADDRESS__ # define PAX_UTILS_CLEANUP 1 diff --git a/pspax.c b/pspax.c index 6094882..e79469d 100644 --- a/pspax.c +++ b/pspax.c @@ -189,15 +189,6 @@ static int print_executable_mappings(int pfd) return 0; } -#ifdef __BOUNDS_CHECKING_ON -# define NOTE_TO_SELF warn( \ - "This is bullshit but getpwuid() is leaking memory and I wasted a few hrs 1 day tracking it down in pspax\n" \ - "Later on I forgot I tracked it down before and saw pspax leaking memory so I tracked it down all over again (silly me)\n" \ - "Hopefully the getpwuid()/nis/nss/pam or whatever wont suck later on in the future.") -#else -# define NOTE_TO_SELF -#endif - static const struct passwd *get_proc_passwd(int pfd) { struct stat st; @@ -577,6 +568,5 @@ int main(int argc, char *argv[]) pspax(name); - NOTE_TO_SELF; return EXIT_SUCCESS; }