From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +TFBMFOxX2qfMiEAWB0awg (envelope-from ) for ; Tue, 21 Jul 2026 13:50:11 -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=hpKZyVzk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C16991E033; Tue, 21 Jul 2026 13:50:11 -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 autolearn=unavailable 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 219261E033 for ; Tue, 21 Jul 2026 13:50:11 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9DEBE4BA2E1C for ; Tue, 21 Jul 2026 17:50:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DEBE4BA2E1C 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=hpKZyVzk Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id 562724BA2E32 for ; Tue, 21 Jul 2026 17:49:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 562724BA2E32 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 562724BA2E32 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784656180; cv=none; b=EY1vH5uC7rNxY66zkHtKbL3It0hfunu7J4JvlY6WQdU4G3Mc2EMAcxyOan41DeMJh/zGdwjbs7i8MFiXH6AsOQ3/hbKmgVP8JiQiDambUACKbzjbdO1oIAz5cUU46AalgLvXG+ewQ6IXhBp3yry8bCNLWOLtgO8kvQHCBy2xGKM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784656180; c=relaxed/simple; bh=N8zCkqjxNIlVOSGtYUzh9JUs11Vv1n90VyNTu+4Wa3s=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=MZW6Q2A+JKtGCBMu7pruHa3PqRkOVtkNxG2XyQcWOjoJMuPyHvzw6pVlYjB/zXDngwXVgyzTm3Sxctk/5fh92XFYAOj+w/adw3ZKzsJeOYBtCYHZ2Fkw+AlvAbswtHH/5cgDlyd+kgUjirx5B6QPPAeVx9R8BjCWqvVQFIJvQuM= 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=hpKZyVzk reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 562724BA2E32 Received: from eig-obgw-5004b.ext.cloudfilter.net ([10.0.29.208]) by cmsmtp with ESMTPS id mDpAwJUW0usRSmEb5wD2ei; Tue, 21 Jul 2026 17:49:39 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id mEb4wYVbPLQlXmEb4w7caq; Tue, 21 Jul 2026 17:49:38 +0000 X-Authority-Analysis: v=2.4 cv=AeWxH2XG c=1 sm=1 tr=0 ts=6a5fb133 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=RAioF0-LDSMA:10 a=ItBw4LHWJt0A:10 a=pGLkceISAAAA:8 a=ChJG1TPvGuGWyG13PwkA:9 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=0ht3iTz5RzmlTHxDFDRU73I7txtD2lovcN+eWzGfprw=; b=hpKZyVzkbR3vy0Jzqin+5vTpVz MSg20BazMbYVb90Ljj/BomVlHR6MRYBWXiwTWbZY4lcBdGUliU3sBvB/pzdMtUKRUiXD3PdtBZuTg e46ytPoKARiXRSlM1sgq7/uiq; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:34894 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wmEb4-00000002tTk-0388; Tue, 21 Jul 2026 11:49:38 -0600 From: Tom Tromey To: Aditya Vidyadhar Kamath Cc: ulrich.weigand@de.ibm.com, simon.marchi@polymtl.ca, tom@tromey.com, gdb-patches@sourceware.org, Aditya.Kamath1@ibm.com, sangamesh.swamy@in.ibm.com, PRAJWAL.B.MEHENDARKAR@ibm.com Subject: Re: [PATCH v2][RFC] Fix crash in AIX when current working directory is NULL In-Reply-To: <20260716112022.81520-2-akamath996@gmail.com> (Aditya Vidyadhar Kamath's message of "Thu, 16 Jul 2026 16:50:23 +0530") References: <20260716112022.81520-2-akamath996@gmail.com> X-Attribution: Tom Date: Tue, 21 Jul 2026 11:49:36 -0600 Message-ID: <878q74utan.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: 1wmEb4-00000002tTk-0388 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:34894 X-Source-Auth: tom+tromey.com X-Email-Count: 20 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfN3IVshA+wYB0xJbreo0kmFVq4rQkqXL2lGSzzYpNFx6I9R/sSxV3/OZyuqS/AbLcWCwG6vUquXga4cfJZQGhbvR2Y1Q06yCcZXs61+IOTsor7sOGrd+ IerCfnmn/SxJfMoQTIa/vhg3b2OJzJgxjuvbdYHFn55WvcAKU0svlnWLknGCSQbQiVKxCiq2iqmdj7ShEn29yXP5cSOAA82jmX8= 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 >>>>> Aditya Vidyadhar Kamath writes: > desc = openp (search_path, flags, file_name, O_RDONLY | O_BINARY, > - &absolute_name, per_bfd->captured_cwd.c_str ()); > + &absolute_name, per_bfd->captured_cwd.has_value () ? > + per_bfd->captured_cwd->c_str () : nullptr); gdb style is to put operators at the start of a new line. For "?:" in particular I would also move the condition to a new line. > diff --git a/gdb/testsuite/gdb.base/getcwd-fail-helper.c b/gdb/testsuite/gdb.base/getcwd-fail-helper.c > new file mode 100644 > index 00000000000..a5e8fe80cbf > --- /dev/null > +++ b/gdb/testsuite/gdb.base/getcwd-fail-helper.c > @@ -0,0 +1,67 @@ > +/* Helper to reproduce getcwd failure by deleting cwd via child process. */ > +#include New files should have a copyright header. This applies to the other files as well. > +catch {file delete -force $temp_dir} Deleting this is probably undesirable. It's normally good if running a test leaves the test environment around. Tom