pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix setvbuf()-induced crash in libpq_pipeline
Date: Thu, 01 Apr 2021 19:31:15 +0000
Message-ID: <E1lS32B-0003sR-9R@gemulon.postgresql.org> (raw)

Fix setvbuf()-induced crash in libpq_pipeline

Windows doesn't like setvbuf(..., _IOLBF) and crashes if you use it,
which has been causing the libpq_pipeline failures all along ... and our
own port.h has known about it for a long time: it offers PG_IOLBF that's
defined to _IONBF on that platform.  Follow its advice.

While at it, get rid of a bogus bitshift that used a constant of the
wrong size.  Decorate the constant as LL to fix.  While at it, remove a
pointless addition that only confused matters.

All as diagnosed by Tom Lane.

Discussion: https://postgr.es/m/3458958.1617302154@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a68a894f0198aaeffa81b3027f135adcdaa8abf6

Modified Files
--------------
src/test/modules/libpq_pipeline/libpq_pipeline.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



Message-ID: <E1lS32B-0003sR-9R@gemulon.postgresql.org>
Permalink:  ../E1lS32B-0003sR-9R@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lS32B-0003sR-9R@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Fix setvbuf()-induced crash in libpq_pipeline
  In-Reply-To: <E1lS32B-0003sR-9R@gemulon.postgresql.org>
  References: <E1lS32B-0003sR-9R@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox