From patchwork Fri Jul 7 18:48:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1805031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=az7d9t5p; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QyMtS1b8Yz20WT for ; Sat, 8 Jul 2023 04:51:12 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3DA2338353B5 for ; Fri, 7 Jul 2023 18:51:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DA2338353B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1688755870; bh=B/dZIZNyxlrBjOlhlqDJikYa6RMVsqdPjrbDjkNt8Fs=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=az7d9t5pu0hFF94vk1YMI55J6KxlT23+Pq8KRRodPDGrO7Nn/k8dd7SvTPsskbPKA 2dCRRXDijx0PFqr/iZIL4WRyml+kD2+TlZvffJIvseT+8Vb7JYNnKeE17OihFyD5cY cZR5fgJFhYHg47e/ZtwStPVcHTzN9O4xYdyd0o7c= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 2184B3848B99 for ; Fri, 7 Jul 2023 18:48:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2184B3848B99 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-643-HSPSJ5s_NiCbc3Y0cFTa9Q-1; Fri, 07 Jul 2023 14:48:16 -0400 X-MC-Unique: HSPSJ5s_NiCbc3Y0cFTa9Q-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6329628EC110 for ; Fri, 7 Jul 2023 18:48:16 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD1CE492C13 for ; Fri, 7 Jul 2023 18:48:15 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v2 10/32] elf: Make usable in ld.so In-Reply-To: Message-ID: <0f12702c22982f953d2f085adc98d0844ff3e0f9.1688741159.git.fweimer@redhat.com> References: X-From-Line: 0f12702c22982f953d2f085adc98d0844ff3e0f9 Mon Sep 17 00:00:00 2001 Date: Fri, 07 Jul 2023 20:48:13 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" __libc_alloc_buffer_create_failure used to snprintf, which is not available in ld.so. The size information in the error message is probably not that useful, so remove it. --- malloc/alloc_buffer_create_failure.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/malloc/alloc_buffer_create_failure.c b/malloc/alloc_buffer_create_failure.c index c9557cae5b..7a2c2b7b8f 100644 --- a/malloc/alloc_buffer_create_failure.c +++ b/malloc/alloc_buffer_create_failure.c @@ -22,9 +22,5 @@ void __libc_alloc_buffer_create_failure (void *start, size_t size) { - char buf[200]; - __snprintf (buf, sizeof (buf), "Fatal glibc error: " - "invalid allocation buffer of size %zu\n", - size); - __libc_fatal (buf); + __libc_fatal ("Fatal glibc error: invalid allocation buffer\n"); }