On Thu, Sep 03, 2020 at 11:39:57AM -0300, Ranier Vilela wrote:
> I'm using about 4 static analysis tools.
It seems to me that this is the root of the problem here.
--
Michael
signature.asc
Description: PGP signature
Em qua., 2 de set. de 2020 às 20:17, Peter Geoghegan escreveu:
> On Wed, Sep 2, 2020 at 3:16 PM Ranier Vilela wrote:
> Perhaps you recall our discussion of a similar false positive in
> nbtsplitloc.c; that had a similar feel to it. For example, if your
> static analysis tool says that code th
On Wed, Sep 2, 2020 at 3:16 PM Ranier Vilela wrote:
> Oh, I'm sorry, I thought that "hard crash" was a bad thing.
I think that you are being sarcastic here, but just in case I'm wrong
I'll clarify what I meant: a good sign that a static analysis tool has
produced a useless complaint is that it ap
> Even if BTreeTupleGetHeapTID() did somehow return a NULL
> pointer, then the user would be getting off lightly by experiencing a
> hard crash instead of data corruption.
>
Oh, I'm sorry, I thought that "hard crash" was a bad thing.
Ranier Vilela
On Wed, Sep 2, 2020 at 2:41 PM Ranier Vilela wrote:
> Maybe, better make sure, because:
> 3. Line 2285 (nbtutils.c):
> ItemPointerCopy(BTreeTupleGetMaxHeapTID(lastleft), pivotheaptid);
> 4. Line 2316 (nbtutils.c) :
> ItemPointerCopy(BTreeTupleGetHeapTID(firstright), pivotheaptid);
>
> Can
Also, in:
5. Line 2671 (nbtutils.c):
ItemPointerGetBlockNumber(BTreeTupleGetHeapTID(newtup)),
ItemPointerGetOffsetNumber(BTreeTupleGetHeapTID(newtup)),
itemptr.h:
/*
* ItemPointerGetBlockNumberNoCheck
* Returns the block number of a disk item pointer.
*/
#define ItemPointerGetBlockNumberNoC
Hi,
Is possible that BTreeTupleSetNAtts, leave everything tidy, so that
BTreeTupleGetHeapTID doesn't fail.
BTreeTupleGetHeapTID can return NULL.
But, as we can see:
1. Line 2085 (nbtutils.c):
if (BTreeTupleGetHeapTID(itup) != NULL && tupnatts != nkeyatts)
2. Line 803 (nbtsearch.c):
if (he