From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id CA23C3858C52 for ; Mon, 1 Aug 2022 10:45:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA23C3858C52 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-84-yXjzLKM7OEiCdmzt6RdM0g-1; Mon, 01 Aug 2022 06:45:39 -0400 X-MC-Unique: yXjzLKM7OEiCdmzt6RdM0g-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 324338032F6 for ; Mon, 1 Aug 2022 10:45:39 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8645C492C3B for ; Mon, 1 Aug 2022 10:45:38 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 0/3] Internal asserts cleanups X-From-Line: 32183839aed39d547a7ebbd50bbcd5575746a233 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 01 Aug 2022 12:45:36 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2022 10:45:41 -0000 Internal asserts do not need to write to stderr (and call into libio). These small series redefines __assert_fail inside libc itself, so that it more reliably terminates the process. Thanks, Florian Florian Weimer (3): stdio: Clean up __libc_message after unconditional abort nptl: Remove uses of assert_perror assert: Do not use stderr in libc-internal assert assert/Makefile | 7 +++++- assert/__libc_assert_fail.c | 33 ++++++++++++++++++++++++++ assert/assert.c | 1 - debug/fortify_fail.c | 4 +--- elf/Makefile | 1 + include/assert.h | 12 +++++++--- include/stdio.h | 9 +------ malloc/malloc.c | 19 +-------------- stdlib/tst-bz20544.c | 2 +- sysdeps/nptl/gai_misc.h | 11 +++------ sysdeps/posix/libc_fatal.c | 47 +++++++++++++++++-------------------- 11 files changed, 77 insertions(+), 69 deletions(-) create mode 100644 assert/__libc_assert_fail.c base-commit: 5fded9c44537283593a7f839347f831e15726572 -- 2.35.3