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

From Tom Lane
Subject Re: new heapcheck contrib module
Date
Msg-id 114862.1603418485@sss.pgh.pa.us
Whole thread Raw
In response to Re: new heapcheck contrib module  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: new heapcheck contrib module  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes:
> 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. 

Argh.  So we really have, using same test except

    memcpy(&lp, "\\x77", sizeof(lp));

little endian:    off = 785c, flags = 2, len = 1b9b
big endian:    off = 2e3c, flags = 0, len = 3737

which explains the apparent LP_DEAD result.

I'm not particularly on board with your suggestion of "well, if it works
sometimes then it's okay".  Then we have no idea of what we really tested.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: Would it be helpful for share the patch merge result from cfbot
Next
From: Michael Paquier
Date:
Subject: Re: Would it be helpful for share the patch merge result from cfbot