Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsTbj-002PWJ-77 for pgsql-committers@arkaria.postgresql.org; Wed, 12 Mar 2025 21:27:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tsTbh-00E7LD-RJ for pgsql-committers@arkaria.postgresql.org; Wed, 12 Mar 2025 21:27:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsTbh-00E7L5-Jp for pgsql-committers@lists.postgresql.org; Wed, 12 Mar 2025 21:27:17 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tsTbd-002WLz-2C for pgsql-committers@lists.postgresql.org; Wed, 12 Mar 2025 21:27:17 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-5495c1e1b63so346277e87.0 for ; Wed, 12 Mar 2025 14:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741814834; x=1742419634; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Z9qPUsuESbu1pIyecDGFGECSMLAzIOsdxzMUm6NgRII=; b=XN8zH4SjO5EK+73Ahnt0I188ADXs5mZ7VT7l1tepaKPUvpZB3uVm+ciSuq5OtMJcsW vijsfbRny8dB4uS+PxOh+yGGJ9RzQJpqPS5aazXHmOPw8s4Bq6ytTczkvmU3S+6UNW/M olkk1PQVkiqQTliA+jupN4/CARoj3RcpZeiwCLQLCbDy8cgE1X1jJ6TyxoOGMm1WD2bn OyYAmvKjF+SGb+yXXWQEspOtrBnaNJNwUT0N/IqDGegn3BD6qQAqQvRdBBXaJrC3YhI7 cV8wXb9HWVjutWC9qTymnNbyLLFgpVCLDlrH55Oh1gkzzUVrnSx8qJIjeHbWC6CJlfYH swcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741814834; x=1742419634; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z9qPUsuESbu1pIyecDGFGECSMLAzIOsdxzMUm6NgRII=; b=iBtpO6dLpaDYhYiurLB/2Slf+0h34gJnjqdjCvMib9L7k4ibZn9Lnbdb8J+A70uauC OLKNSoGyjZLs0hM0ofYbAkoHGqmpezhHUwDlEaSKfvzMrBCGZEPok99ftIAKwqaZPw7h XLlnLAe2DxiZZhJ7DkerrZNFZeNNdm9iYfEJaswDo+ks2RZ9QfODSaub/ZSFFspsakwS xCI+gzvpA846QN/D0YiKhjX92A85saE3DnrBr5cg2rXAF4CbyKFkMVaWjWyxIlYz9f+7 /2MHgxeRspY47VTPeqI92fjghBGH1304X76yvqVCgjlsiQNym33I5PfWBBjtOsQAsqHt H4PA== X-Forwarded-Encrypted: i=1; AJvYcCWIGGXn5svHeWWpCv/uCMr6IAbN1zT/vhiJhHqfrRHyasHIvOsVlv1/ePmZgbbAy5Y/IyZJP5jCk7HCP+p0Z74l@lists.postgresql.org X-Gm-Message-State: AOJu0YzI71MuG7/HPbCcN458SFSUMV4v5/4lQlX8ERnSIyhH/PvMTO7t zeEgEqVezdpKKXvt9yKkMPzUv+9y7WSEIgHhUnTF4aJp0TjW77CW9hZkjoMNYl3JMWvNNi6JxgG 4YQLJLRX8ce7FmlAQXDCM79xv5Fw= X-Gm-Gg: ASbGnct/v1b9XTjYg85q6TP2/BFMFMybFl0DA1PP5LEkI+M5zcDEAV4HTpOwnQVsxQs cfQlFH/ovCrhJKoE1AVbyOa3bODl8KDsiS9xn8j9k5V9VOAm/JCgAyrYWe5FDQcWdg39irr3HxC anf8oovoKyeQCadZSfh6+cBpU= X-Google-Smtp-Source: AGHT+IH3OQ5xIHzRRlIIEcHiCRaLZ83bUboTcsBwg2vj9khKKtJsRsrptexe4nhk659xNJ/CT/PKST4UbdZxLyPR4mw= X-Received: by 2002:a05:6512:6d2:b0:545:8f0:e1a4 with SMTP id 2adb3069b0e04-549abaf0b00mr4057911e87.45.1741814833522; Wed, 12 Mar 2025 14:27:13 -0700 (PDT) MIME-Version: 1.0 References: <1896564.1741756689@sss.pgh.pa.us> In-Reply-To: <1896564.1741756689@sss.pgh.pa.us> From: Masahiko Sawada Date: Wed, 12 Mar 2025 14:26:37 -0700 X-Gm-Features: AQ5f1Job7Hue8uU8hLnRHJn0pDmz0jbw6lsrm0CBNlAElvIjeFeUh8vUaBCRgHY Message-ID: Subject: Re: pgsql: pg_logicalinspect: Fix possible crash when passing a directory p To: Tom Lane Cc: David Rowley , pgsql-committers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 11, 2025 at 10:18=E2=80=AFPM Tom Lane wrote= : > > Masahiko Sawada writes: > > On Tue, Mar 11, 2025 at 7:08=E2=80=AFPM David Rowley wrote: > >> This introduces a new compiler warning for compilers that don't know > >> the ereport(ERROR) does not return. > > > Thank you for the report. Can we generate the warning using some gcc's > > warning flags? I'd like to add a check to my personal pre-commit test. > > I don't know of an easy way. I experimented with doing this: > > diff --git a/src/include/c.h b/src/include/c.h > index a14c6315162..467b1f58ae8 100644 > --- a/src/include/c.h > +++ b/src/include/c.h > @@ -315,7 +315,7 @@ > #elif defined(_MSC_VER) && !defined(USE_ASSERT_CHECKING) > #define pg_unreachable() __assume(0) > #else > -#define pg_unreachable() abort() > +#define pg_unreachable() ((void) 0) > #endif > > /* > > which seems like it ought to be enough to provoke such warnings > (in assert-enabled builds). I got upwards of sixty build warnings > this way, but the place David mentions was *not* among them. > So I'm confused. Thanks. In my environment, I got the warning by this way. And I've pushed the fix. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com