From patchwork Thu Dec 7 10:31:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 81640 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4446438618BA for ; Thu, 7 Dec 2023 10:32:48 +0000 (GMT) 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.133.124]) by sourceware.org (Postfix) with ESMTPS id E31F2386074B for ; Thu, 7 Dec 2023 10:31:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E31F2386074B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E31F2386074B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701945108; cv=none; b=wWgAYtk+DQBfAygwhUgV7jqiuwcrDY5J72/Vl9Wt6EJPW+Bm9/n5JR/80K4j6dn+wTa2V1BiVASPUV6vcz9QNLbn4AfWGIIYb5+hXkgRK10gup3Bz9yKr/EfhRrb96+M/759OdGYwu3yyD01C0Zxk1EWkHbAJ/FgbBBTeoKihJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701945108; c=relaxed/simple; bh=bIM/FKBOdF/xKMyn11M57u+6Jaj0KqmqYYaUHSpykp8=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=qQWFyQeM/XX8csF9qxrT3KlJxWG3118lAX4hzxbo1s0n28s3x+GkgG53IvtXaX5x9U9O/YRTZsjFPHJBVMqa1NxLR1OnG84GdBx+0gkdXrpkjUEaRTv7jOPFjAwM1XWjNftJ6d9u5xRly8g1/7z7RcvDhywcfqNZYLgY/LF1dvo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701945106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3oreZa5Bryury4K0R3PxTZhZhFsHzdKbIWdaBEekMKM=; b=Lg4z+TCHbo8HZU5WAVXcSQbsiAskFP0QG6h/0lPafYBOoBOjh5EF6CcYafzlnFfQ9AfvN7 l/X5sLZtg1XRi722/gtX+w+SQQsBkGUVDX6awsXrZMpaQpV2JUS2vBBeGyWhB15iAyGDgA tLVE2FHzV60BCEf2DqFS1dZ7K9Bzjz0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-248-mxmt_7uTN1Wzkycj_4N21g-1; Thu, 07 Dec 2023 05:31:45 -0500 X-MC-Unique: mxmt_7uTN1Wzkycj_4N21g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id D22133C100B6 for ; Thu, 7 Dec 2023 10:31:44 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.131]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 379C32026D66 for ; Thu, 7 Dec 2023 10:31:44 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH v3 10/32] elf: Make usable in ld.so In-Reply-To: Message-ID: <9c999f5c5ccb5d3850192760e40185cb1f04f603.1701944612.git.fweimer@redhat.com> References: X-From-Line: 9c999f5c5ccb5d3850192760e40185cb1f04f603 Mon Sep 17 00:00:00 2001 Date: Thu, 07 Dec 2023 11:31:42 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 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_H3, 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.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org __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"); }