pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: James Coleman <jtc331@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16104: Invalid DSA Memory Alloc Request in Parallel Hash
Date: Sat, 21 Dec 2019 10:02:05 -0500
Message-ID: <12106.1576940525@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+hUKGLFdtOtrB-Nx0Rhqw8tLR-DiTqPv+cRqVMTRc35a48-QA@mail.gmail.com>
References: <20191210173224.y5vaam6ep7pjmddt@development>
	<20191210173516.GA10987@alvherre.pgsql>
	<20191210183606.t26c5ypa7bmij3ph@development>
	<CA+hUKGK3g7SQ7_KfKm2uNFF6LoLwTy1-x8CLXsV5KA-rxW6F9g@mail.gmail.com>
	<CA+hUKGKA+tKg1v29=mfxbTkXSoRdFTzmD3R0U2YgwxRxLbLtMA@mail.gmail.com>
	<29716.1576905031@sss.pgh.pa.us>
	<CA+hUKGLFdtOtrB-Nx0Rhqw8tLR-DiTqPv+cRqVMTRc35a48-QA@mail.gmail.com>

Thomas Munro <thomas.munro@gmail.com> writes:
> Yeah, I suppose it would be nice to get something reusable out of this
> rather than a local definition only.  The other important
> characteristic is the direction of rotation, so here's a version that
> defines pg_rotate_right32() in pg_bitutils.h.  In back-branches
> without that header we could define it locally.

That looks like a good approach.  One thought is that you could rely
on BITS_PER_BYTE from c.h, rather than CHAR_BIT; then you don't have
to #include <limits.h> in bitutils.h, which seems like header creep
we could do without.  (I think most other places that want this
constant use BITS_PER_BYTE, too.)

			regards, tom lane





view thread (55+ messages)  latest in thread

Message-ID: <12106.1576940525@sss.pgh.pa.us>
Permalink:  ../12106.1576940525@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12106.1576940525@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.munro@gmail.com, tomas.vondra@2ndquadrant.com, alvherre@2ndquadrant.com, andres@anarazel.de, jtc331@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16104: Invalid DSA Memory Alloc Request in Parallel Hash
  In-Reply-To: <12106.1576940525@sss.pgh.pa.us>

* 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