From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OkdiCiyTPmpoWhkAWB0awg (envelope-from ) for ; Fri, 26 Jun 2026 10:56:44 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=EFA6/nU3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 166081E024; Fri, 26 Jun 2026 10:56:44 -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.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 6E9221E024 for ; Fri, 26 Jun 2026 10:56:43 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7A0374BA23C6 for ; Fri, 26 Jun 2026 14:56:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A0374BA23C6 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=EFA6/nU3 Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id D33F24BA2E32 for ; Fri, 26 Jun 2026 14:56:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D33F24BA2E32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D33F24BA2E32 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782485777; cv=none; b=FxgfoTs1p6cxzOwnYRFx0i82EFljaLxD+uL6pOn2XINz33i5whMlTDZ52LuVfSvdR0D01KRM5nSMTeELJQV+FhpfBOZ5qdrt4qr1CAcYuROyayucBa0XyVoUyFYEMCwZfleO8wGJ1ymt5aGD4IrAmMHaPA8oyyryJf5EOYjbY9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782485777; c=relaxed/simple; bh=GXNpabcA03DWNBB5bP4MnoGHq0Tbwr2+/fxIHX5QT68=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FBllmG2PPl4cw6fGiyXoLiHmnV+I+evLp+sCVyTsuKI245m7lkJgMP5FgNL4ZDmYphF2lu6QggsVeU8u8HrgtsmoI7asxKfC7U4kXonPhYeOF4Pi4tSO96GPEUGH4KwIbJO11ozLEqWhuPOs42yxcogu5Ed16LTO0aLDg0+uC7c= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=EFA6/nU3 reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D33F24BA2E32 Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id d76BwbWZ1VGUKd7ybwvGoU; Fri, 26 Jun 2026 14:56:17 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id d7yawr1ZbyxCId7yawblVk; Fri, 26 Jun 2026 14:56:16 +0000 X-Authority-Analysis: v=2.4 cv=XOYwSRhE c=1 sm=1 tr=0 ts=6a3e9310 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=FelO9ux0wxsA:10 a=ItBw4LHWJt0A:10 a=CCpqsmhAAAAA:8 a=IrU37Jj3HG6CrcWZKV8A:9 a=6bYTOFgWmvgA:10 a=ul9cdbp4aOFLsgKbc677:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=A7m1SdUMhLqxzJ7eosJoWgsTxW8Gl2PFjmNAJ6vYcL0=; b=EFA6/nU3+myJ0bZnyTB8njY5+X ZRN8DspgPjzxmqzv2ebk8xDhpgRHksu64WTjwnl9eJdLYefOR/PSUgjKAvaLiHCob6/DH34F+9g2+ BRgtXVZZWSK/uCC8ov/m90Bs1; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:44690 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wd7yZ-00000004FbE-2s5R; Fri, 26 Jun 2026 08:56:15 -0600 From: Tom Tromey To: Aditya Kamath Cc: Keith Seitz , Aditya Vidyadhar Kamath , "gdb-patches@sourceware.org" Subject: Re: [PATCH] Fix crash in AIX when current working directory is NULL In-Reply-To: (Aditya Kamath's message of "Wed, 24 Jun 2026 11:50:01 +0000") References: <20260622091114.18783-2-akamath996@gmail.com> <3ae0f8af-b88a-4f51-bce8-19be9b404fa0@redhat.com> X-Attribution: Tom Date: Fri, 26 Jun 2026 08:56:14 -0600 Message-ID: <87wlvlwdtd.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wd7yZ-00000004FbE-2s5R X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:44690 X-Source-Auth: tom+tromey.com X-Email-Count: 8 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfHa1ghjf6Ho0Jm/KYm7jHPrHvpy1qv5z3repHhVyf4NpZbtrGDXZF01rbnLe42Hkg5HhBLtLBzhEsV24p08UiSvKO8yogiFWLKPMJ9gePnNKLoZJtIAi ZxEh/7NiAyCIhUCT4D+pCv5FL/zWa6SuElVbUUs3fj2ICxKf7IK1QaoCgPmGvxyUUAEg9DnjQxD9A+R6eqXkyHjjYHbDjUbBUh8= 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 > I did test other places where getcwd () is used. But the only thing is > it is not causing any crash. I could not produce a similar issue when > getcwd () is not able to get the current directory for any reason due > to other files using getcwd(). > What do you think is the best thing we can do? Should we then change > the main.c file as well to handle getcwd () failing to make it uniform > everywhere in GDB wherever possible since we are thinking there will > be a way by which one can run into similar issue due to the same? FWIW there's also this bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33799 and this old thread: https://sourceware.org/pipermail/gdb-patches/2026-January/224101.html Maybe we should have just landed this earlier rather than asking to fix it in a real way. It's not totally clear to me what a good approach might be. Like there's no good default to use when getcwd fails. Maybe "/"? Tom