Re: new heapcheck contrib module - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: new heapcheck contrib module
Date
Msg-id FD049D31-9231-4F87-BED9-9848FEE15374@enterprisedb.com
Whole thread Raw
In response to Re: new heapcheck contrib module  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: new heapcheck contrib module  (Mark Dilger <mark.dilger@enterprisedb.com>)
Re: new heapcheck contrib module  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

> On Oct 22, 2020, at 6:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I wrote:
>> I get
>> off = 7777, flags = 2, len = 3bbb
>> on a little-endian machine, and
>> off = 3bbb, flags = 2, len = 7777
>> on big-endian.  It'd be less symmetric if the bytes weren't
>> all the same ...
>
> ... but given that this is the test value we are using, why
> don't both endiannesses whine about a non-maxalign'd offset?
> The code really shouldn't even be trying to follow these
> redirects, because we risk SIGBUS on picky architectures.

Ahh, crud.  It's because

    syswrite($fh, '\x77\x77\x77\x77', 500)

is wrong twice.  The 500 was wrong, but the string there isn't the bit pattern we want -- it's just a string literal
withbackslashes and such.  It should have been double-quoted. 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: new heapcheck contrib module
Next
From: Thomas Munro
Date:
Subject: Re: Would it be helpful for share the patch merge result from cfbot