From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id od9GNGwJimqvbjcAWB0awg (envelope-from ) for ; Sat, 22 Aug 2026 16:41:16 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=FKRuhMGk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C9AC41E0A3; Sat, 22 Aug 2026 16:41:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 47B3F1E09B for ; Sat, 22 Aug 2026 16:41:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F7784B9DB71 for ; Sat, 22 Aug 2026 20:41:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F7784B9DB71 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=FKRuhMGk Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 1B7774BA901E for ; Sat, 22 Aug 2026 20:40:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B7774BA901E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1B7774BA901E Authentication-Results: sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787431252; cv=none; b=VmQ/+Qxcju9pCywCX322o2whOYNwqJoCvfztXtSQGHVtEfD9UMRpLGbwjeJnFGhKlDM0xWM7voGcrxGwNK8CrD0Qo4DBuKEh8U/dLchFyLfFTlqYGP5sAXkARb9ZCeVfIOJThYJhs09s1LA3QrOHaqBk5G6EQis1MS8HApvqhlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787431252; c=relaxed/simple; bh=8Plgq6BjAgoRTaFO/83EgkkO1TldpphTna7u/h1ICWc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bV/pa+PHfbVAqEwNi/Ni/tHQ7/4TA6VLIxpYi1eoQTZUfDU/I3+ObqmsSek+72YwIu0c9sYbICqEPG3+6osC0zu+KzFzBOoInTi1Svubhj1S9YF5QNedAdPH/5oZSmdiM5kKBLOAmrsBi6rTXBbdm7oFr8LQ+Tu3SHmTraEaEYY= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=FKRuhMGk DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B7774BA901E Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 32CF0EE68A; Sat, 22 Aug 2026 22:40:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1787431250; bh=8Plgq 6BjAgoRTaFO/83EgkkO1TldpphTna7u/h1ICWc=; b=FKRuhMGkuWJd50sYZ3ZrR VoikMDRziAlgHv5pW6LpnBsVLL+IVncbCdUUdDL73rhCiUjg71OF+i5NFwEcGF3X nWgaqE7gAwoM+FcorH/RaR/mEx4YXvyT+aElInfpVIsgELxvs6A02CbrFts0lhn2 fbDX+c4RjzV9a7Y8S+Kj9boQaNue5wg05SCzvK85dS2mzsrRX0ZUyaepHZCiNGCJ Onrp2lM3gLw3RplJonlc0Qh4A3NeUuCgSLcpWWcattuI4qA61LA/02pD5tuVY0A+ yjl9G+JQJ8F1MFptFWRPNazEnvdMgeh+031/zaYtBvoIe7e+6K3O+EAn4PZuG2fF g== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id y3eSZHiXlOnK; Sat, 22 Aug 2026 22:40:50 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508553da.dip0.t-ipconnect.de [80.133.83.218]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id C4458EE713; Sat, 22 Aug 2026 22:40:50 +0200 (CEST) From: Rainer Orth To: Cc: Andrew Burgess , Simon Marchi Subject: [PATCH] Reduce gdb.base/many-headers.c iterations on Solaris [PR34555] Date: Sat, 22 Aug 2026 22:40:50 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --=-=-= Content-Type: text/plain As detailed in PR corefiles/34555, when reading the core file in the gdb.base/many-headers.exp test, gdb consumes excessive amounts of memory on Solaris. If left unchecked, e.g. with ulimit -Sv 8388608, the test will consume all available swap space. Since Solaris doesn't do lazy allocation, this will cause the system to become unusably slow. To avoid this, this patch reduces the iteration count by a factor of 100. Tested on sparcv9-sun-solaris2.11, x86_64-pc-solaris2.11, and x86_64-pc-linux-gnu. Ok for trunk and the gdb-18 branch? AFAICT, the issue is purely in gdb's Solaris corefile reader, which seems to need a complete rewrite rather than a couple of bugfixes. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol2-many-headers-iter.patch # HG changeset patch # Parent c3dbfb6080fbfc4d3b581adca10f1951ecb880e6 Reduce gdb.base/many-headers.c iterations on Solaris [PR34555] diff --git a/gdb/testsuite/gdb.base/many-headers.c b/gdb/testsuite/gdb.base/many-headers.c --- a/gdb/testsuite/gdb.base/many-headers.c +++ b/gdb/testsuite/gdb.base/many-headers.c @@ -25,7 +25,12 @@ main (void) char *ptr; int ind, cnt; +#if defined __sun__ && defined __svr4__ + /* PR corefiles/34555. */ + cnt = 1000; +#else cnt = 100000; +#endif for (ind = 0; ind < cnt; ind++) { ptr = mmap (NULL, 100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); --=-=-=--