From patchwork Tue Jul 9 08:02:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Haehnel X-Patchwork-Id: 1958227 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernkonzept.com header.i=@kernkonzept.com header.a=rsa-sha256 header.s=mx1 header.b=J4NEI0X/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WJD5V3KLHz1xqc for ; Tue, 9 Jul 2024 18:03:42 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 3940E353622F; Tue, 9 Jul 2024 10:03:28 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernkonzept.com header.i=@kernkonzept.com header.a=rsa-sha256 header.s=mx1 header.b=J4NEI0X/; dkim-atps=neutral Received: from mx.kernkonzept.com (serv1.kernkonzept.com [159.69.200.6]) by helium.openadk.org (Postfix) with ESMTPS id 008EA3536227 for ; Tue, 9 Jul 2024 10:02:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Content-Transfer-Encoding:MIME-Version:Message-ID :Date:Subject:To:From:References:In-Reply-To:Cc:Reply-To:Content-Type: Content-ID:Content-Description; bh=ckfsKL4qxrICYIpZaizuWvATNqArWPn5j5TydVAikUk=; b=J4NEI0X/ddM78mw3pITLagyYrz mZyO7sCQRtLY51wyo4BO+urhBOiSWl5RkRHT4IBngeHEHBOPbhPfnyeDqM7kb0+J3h6wh9tIstq7T SXAfKatdt44aCX6LmZXkaVgn5bQaWwIEeE+1UYfOv4CO+6qvli6DjAHF2MvuRwrgUhjP3cGjqwvmq XAejtJ76A7QR32I2T6u942UVxf5EFButgglMTwW/Yv85c1KSSYBYI3ZwGbMtWG2pnsSspHqs6g2eE OYo7ftGTZX/cq1APUq8ipXnV38Y92pmuBNPSMtUVht71Xck+4DWGOrGZIMdvHZkD3CvylLrzHabyy TorBrnVQ==; Received: from [10.22.3.160] (helo=amethyst.dd1.int.kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1sR5oN-000niJ-0N for devel@uclibc-ng.org; Tue, 09 Jul 2024 10:02:55 +0200 From: Marcus Haehnel To: devel@uclibc-ng.org Date: Tue, 9 Jul 2024 10:02:43 +0200 Message-ID: <20240709080249.5335-1-marcus.haehnel@kernkonzept.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Message-ID-Hash: M7Z4JKSICU5DFS2FU3AP5JPGA2D5FQI2 X-Message-ID-Hash: M7Z4JKSICU5DFS2FU3AP5JPGA2D5FQI2 X-MailFrom: marcus.haehnel@kernkonzept.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH] stdlib: increase number of static atexit handlers to 32 List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Yann Le Du The existing limit of 20 was found to be insufficient when moving from gcc 8 to gcc 9. At the time a test ran already 16 handlers had been installed leaving only minimal room for application installed handlers. Musl uses 32, as does newlib. Further, the ISO C standard for C99 specifies that: The implementation shall support the registration of at least 32 functions. (7.20.4.2 The atexit function) Co-authored-by: Yann Le Du Signed-off-by: Marcus Haehnel --- include/stdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/stdlib.h b/include/stdlib.h index 8b1375184..d4e0b75e7 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -606,7 +606,7 @@ libc_hidden_proto(unsetenv) #ifdef __UCLIBC_DYNAMIC_ATEXIT__ # define __UCLIBC_MAX_ATEXIT INT_MAX #else -# define __UCLIBC_MAX_ATEXIT 20 +# define __UCLIBC_MAX_ATEXIT 32 #endif