appropriately.
The error about materialize mode required, is missed.
-At pl_exec.c
The error mgs do not report about the materialize mode
-At pltcl.c:
The function pltcl_init_tuple_store does not check rsi appropriately.
Patch attached.
regards,
Ranier Vilela
v1-0001-uniform-error-msgs
Em dom., 20 de fev. de 2022 às 11:30, Justin Pryzby
escreveu:
> On Sun, Feb 20, 2022 at 11:12:42AM -0300, Ranier Vilela wrote:
> > Like how the commit
> >
> https://github.com/postgres/postgres/commit/07daca53bfcad59618a9c6fad304e380cc9d2bc1
> > The are some paths that
Em dom., 20 de fev. de 2022 às 22:08, Michael Paquier
escreveu:
> On Sun, Feb 20, 2022 at 11:37:33AM -0300, Ranier Vilela wrote:
> > I can't see:
> > plperl.c
> > pl_exec.c
> > pttcl.c
> >
> > Only jsonfuncs.c, but the error about "materialize
Em dom., 20 de fev. de 2022 às 22:45, Ranier Vilela
escreveu:
> Em dom., 20 de fev. de 2022 às 22:08, Michael Paquier
> escreveu:
>
>> On Sun, Feb 20, 2022 at 11:37:33AM -0300, Ranier Vilela wrote:
>> > I can't see:
>> > plperl.c
>> > pl_exec.c
&
Em sex., 12 de fev. de 2021 às 03:56, Kyotaro Horiguchi <
horikyota@gmail.com> escreveu:
> At Wed, 10 Feb 2021 20:12:38 -0300, Ranier Vilela
> wrote in
> > Hi,
> >
> > Per Coverity.
> >
> > If xid is a subtransaction, the setup of base snapshot on
Em sex., 12 de fev. de 2021 às 03:28, Kyotaro Horiguchi <
horikyota@gmail.com> escreveu:
> At Wed, 10 Feb 2021 19:54:46 -0300, Ranier Vilela
> wrote in
> > Hi,
> >
> > Per Coverity.
> >
> > The functions ExecGetInsertedCols and ExecGetUpdatedCols a
he caller can act accordingly.
2. SnapBuildCommitTxn can't ignore a result
from ReorderBufferSetBaseSnapshot, even if it never fails.
regards,
Ranier Vilela
reorderbuffer.patch
Description: Binary data
;manifest_ctx, checksumbuf,
> + PG_SHA256_DIGEST_LENGTH) < 0)
> Here this could just use sizeof(checksumbuf)? This pattern could be
> used elsewhere as well, like in md5_common.c.
>
Done.
Attached a v4 of patch.
regards,
Ranier Vilela
pg_cryptohash_v4.patch
Description: Binary data
Em sáb., 13 de fev. de 2021 às 17:35, Ranier Vilela
escreveu:
>
> Em sáb., 13 de fev. de 2021 às 01:07, Zhihong Yu
> escreveu:
>
>> Hi,
>> How about the following patch ?
>>
>> ReorderBufferSetBaseSnapshot() can return a bool to indicate whether the
>&
.")));
>
> Did you mean this errdetail:
>
> Top transaction is not running.
>
Done.
Thanks Zhihong.
v3 based on your patch, attached.
regards,
Ranier Vilela
reorderbuffer_v3.patch
Description: Binary data
Em sáb., 13 de fev. de 2021 às 20:32, Michael Paquier
escreveu:
> On Sat, Feb 13, 2021 at 05:37:32PM -0300, Ranier Vilela wrote:
> > IMO there is no necessity in back-patching.
>
> You are missing the point here. What you are proposing here would not
> be backpatched. However
Em dom., 14 de fev. de 2021 às 08:22, Michael Paquier
escreveu:
> On Sat, Feb 13, 2021 at 09:33:48PM -0300, Ranier Vilela wrote:
> > Em sáb., 13 de fev. de 2021 às 20:32, Michael Paquier <
> mich...@paquier.xyz>
> > escreveu:
> >
> >> You are missing the p
Em dom., 14 de fev. de 2021 às 22:28, Michael Paquier
escreveu:
> On Sun, Feb 14, 2021 at 11:39:47AM -0300, Ranier Vilela wrote:
> > What do you think?
>
> That's not a good idea for two reasons:
> 1) There is CRC32 to worry about, which relies on a different logic.
>
Em sex., 12 de fev. de 2021 às 13:11, Ranier Vilela
escreveu:
> Em sex., 12 de fev. de 2021 às 03:28, Kyotaro Horiguchi <
> horikyota@gmail.com> escreveu:
>
>> At Wed, 10 Feb 2021 19:54:46 -0300, Ranier Vilela
>> wrote in
>> > Hi,
>> &g
chine, Postgres can rename statistics files.
regards,
Ranier Vilela
1.
https://www.postgresql.org/message-id/20200616041018.GR20404%40telsasoft.com
fix_windows_rename.patch
Description: Binary data
kmode=0x7ffe6f236dec) at heapam.c:3560
I have this report from one static analysis tool:
heapam.c (9379):
Dereferencing of a potential null pointer 'oldtup.t_data'
regards,
Ranier Vilela
Hi,
Per Coverity.
If test set->latch against NULL, is why it can be NULL.
ResetEvent can dereference NULL.
regards,
Ranier Vilela
fix_dereference_before_null_check_latch.patch
Description: Binary data
ot; cannot be either.
Solution proposed merely as a learning experience.
regards,
Ranier Vilela
fix_explicit_null_dereference_ruleutils.patch
Description: Binary data
taches does..).
>
I think that Assert is not the right solution here.
For a function that returns NULL twice (SPI_getvalue), it is worth testing
the result against NULL.
In the future, any modification may cause further dereference.
In addition, the static analysis tools would continue to note this snippet
either as a bug or as a suspect.
Checking "actions" pointer against NULL, and acting appropriately would do.
regards,
Ranier Vilela
> On Mon, Nov 2, 2020 at 1:49 PM Kyotaro Horiguchi
> > > wrote:
> > > > At Sat, 31 Oct 2020 11:40:53 -0300, Ranier Vilela <
> ranier...@gmail.com> wrote in
> > > > > Per Coverity.
> > > > >
> > > > > If test set->latch aga
d even if we
> are not waiting on it.
>
> If we call WaitLatch(OrSocket) that waits on the latch, it immediately
> returns because the latch is set. If we called ResetLatch before the
> next call to WaitLatch(), it correctly waits on a trigger to be
> pulled.
>
+1
The patch for me is syntactically equal to the code changed and
avoids the dereference.
regards,
Ranier Vilela
t;too many client connections for select()");
>exit(1);
>}
It seems to me that the limit is hardcode in,
src/backend/port/win32/socket.c
FD_SETSIZE * 2
that would be 2048?
regards,
Ranier Vilela
Em sáb., 7 de nov. de 2020 às 14:55, Marina Polyakova <
m.polyak...@postgrespro.ru> escreveu:
> On 2020-11-06 23:54, Ranier Vilela wrote:
> > Hi Marina,
>
> Hello!
>
> 1) If you mean the function pgwin32_select in the file
> src/backend/port/win32/socket.c, IIUC
Em ter., 10 de nov. de 2020 às 14:16, Russell Foster <
russell.foster.cod...@gmail.com> escreveu:
> On Tue, Nov 10, 2020 at 12:03 PM Ranier Vilela
> wrote:
> >
> > Em sex., 26 de jun. de 2020 às 08:21, Ranier Vilela
> escreveu:
> >>
> >> Em qui
regards,
Ranier Vilela
pg_cryptohash.patch
Description: Binary data
Em qua., 10 de fev. de 2021 às 01:44, Kyotaro Horiguchi <
horikyota@gmail.com> escreveu:
> At Tue, 9 Feb 2021 22:01:45 -0300, Ranier Vilela
> wrote in
> > Hi Hackers,
> >
> > Per Coverity.
> >
> > Coverity complaints about pg_cryptohash_final funct
Hi,
Per Coverity.
The functions ExecGetInsertedCols and ExecGetUpdatedCols at ExecUtils.c
only are safe to call if the variable "ri_RangeTableIndex" is != 0.
Otherwise a possible Dereference after null check (FORWARD_NULL) can be
raised.
Exemple:
void
1718ExecPartitionCheckEmitError(ResultRel
base_snapshot == NULL);
txn->base_snapshot = snap;
regards,
Ranier Vilela
reorderbuffer.patch
Description: Binary data
0((path_len - level) * sizeof(enum jbvType));
- long lindex;
+ int64 lindex;
JsonbValue newkey;
/*
regards,
Ranier Vilela
jsonfuncs.patch
Description: Binary data
Em qui., 11 de fev. de 2021 às 01:46, Tom Lane escreveu:
> Ranier Vilela writes:
> > *long* 4 *long int*, *signed long int* -2.147.483.648 a 2.147.483.647
> > Therefore long never be > INT_MAX at Windows 64 bits.
> > Thus lindex is always false in this expression:
&g
Em qui., 11 de fev. de 2021 às 09:47, Michael Paquier
escreveu:
> On Wed, Feb 10, 2021 at 09:14:46AM -0300, Ranier Vilela wrote:
> > It is necessary to correct the interfaces. To caller, inform the size of
> > the buffer it created.
>
> Well, Coverity likes nannyism, so ea
Em qui., 11 de fev. de 2021 às 14:51, Tom Lane escreveu:
> Ranier Vilela writes:
> > Em qui., 11 de fev. de 2021 às 01:46, Tom Lane
> escreveu:
> >> At the same time, I think this code could be improved; but the way
> >> to do that is to use strtoint(), rat
Em qui., 11 de fev. de 2021 às 09:47, Michael Paquier
escreveu:
> On Wed, Feb 10, 2021 at 09:14:46AM -0300, Ranier Vilela wrote:
> > It is necessary to correct the interfaces. To caller, inform the size of
> > the buffer it created.
>
> Now, the patch you sent has no need t
Hi,
Per Coverity.
It seems to me that some recent commit has failed to properly initialize a
structure,
in extended_stats.c, when is passed to heap_copytuple.
regards,
Ranier Vilela
fix_uninitialized_var_extend_stats.patch
Description: Binary data
Hi Justin, sorry for the delay.
Nothing against it, but I looked for similar codes and this is the usual
way to initialize HeapTupleData.
Perhaps InvalidOid makes a difference.
regards,
Ranier Vilela
Em dom., 11 de abr. de 2021 às 16:25, Justin Pryzby
escreveu:
> On Sun, Apr 11, 2021 at
Em seg., 12 de abr. de 2021 às 03:04, Tom Lane escreveu:
> Michael Paquier writes:
> > On Sun, Apr 11, 2021 at 07:42:20PM -0300, Ranier Vilela wrote:
> >> Em dom., 11 de abr. de 2021 às 16:25, Justin Pryzby <
> pry...@telsasoft.com>
> >>> I think it&#x
_VACUUM': identificador nao declarado
[C:\dll\postgres\pg_visibility.vcxproj]
regards,
Ranier Vilela
Em sex., 24 de jul. de 2020 às 14:16, Andres Freund
escreveu:
> On 2020-07-24 14:05:04 -0300, Ranier Vilela wrote:
> > Latest Postgres
> > Windows 64 bits
> > msvc 2019 64 bits
> >
> > Patches applied v12-0001 to v12-0007:
> >
> > C:\dll\post
Em sex., 24 de jul. de 2020 às 21:00, Andres Freund
escreveu:
> On 2020-07-24 18:15:15 -0300, Ranier Vilela wrote:
> > Em sex., 24 de jul. de 2020 às 14:16, Andres Freund
> > escreveu:
> >
> > > On 2020-07-24 14:05:04 -0300, Ranier Vilela wrote:
> > > &g
2\KERNEL32.DLL+0x180016fd3)
#24 0x7ffed30fcec0 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18004cec0)
I'm not sure if ASAN can report false positives or if this CHECK error is
own asan bug?
Can you take a look, please?
regards,
Ranier Vilela
not empty and as memory allocated by pg_malloc.
The simplest solution is free namelist, even when calling ereport, why the
level can be
LOG or DEBUG3.
regards,
Ranier Vilela
PS. Are two SplitGUCList in codebase.
1. SplitGUCList (src/bin/pg_dump/dumputils.c)
2. SplitGUCList (src/backend/utils/adt
the user "is not the owner
of the existing statistics object".
regards,
Ranier Vilela
fix_dereference_null_statscmds.patch
Description: Binary data
Hi Tom,
Per Coverity.
The variable root_offsets is read at line 1641, but, at this point,
the content is unknown, so it is impossible to test works well.
regards,
Ranier Vilela
fix_uninitialized_variable_heapam_handler.patch
Description: Binary data
itup->t_tid;
1. Here htids is a SINGLETON?
So:
At line 723:
htids[ui++] = *BTreeTupleGetPostingN(origtuple, i);
2. htids is accessed how ARRAY?
And is acessed at positions 0 and 1, according (nhtids == 1):
Assert(ui == nhtids);
The htids[1] are destroying something at this memory position.
regards,
Ranier Vilela
Em ter., 25 de ago. de 2020 às 18:06, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-25, Ranier Vilela wrote:
>
> > The variable root_offsets is read at line 1641, but, at this point,
> > the content is unknown, so it is impossible to test works well.
Em ter., 25 de ago. de 2020 às 19:45, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-25, Ranier Vilela wrote:
>
> > If the variable hscan->rs_cblock is InvalidBlockNumber the test can
> > protect root_offsets fail.
>
> When does that happen?
&g
Em ter., 25 de ago. de 2020 às 19:54, Ranier Vilela
escreveu:
> Em ter., 25 de ago. de 2020 às 19:45, Alvaro Herrera <
> alvhe...@2ndquadrant.com> escreveu:
>
>> On 2020-Aug-25, Ranier Vilela wrote:
>>
>> > If the variable hscan->rs_cblock is Inval
Em ter., 25 de ago. de 2020 às 20:13, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-25, Ranier Vilela wrote:
>
> > Em ter., 25 de ago. de 2020 às 19:45, Alvaro Herrera <
> > alvhe...@2ndquadrant.com> escreveu:
> >
> > > On 2020-
Em ter., 25 de ago. de 2020 às 20:20, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-25, Ranier Vilela wrote:
>
> > And it is guaranteed that, rs_cblock is not InvalidBlockNumber when the
> > page is read?
>
> It could be InvalidBlockNumber i
Em ter., 25 de ago. de 2020 às 20:29, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-25, Ranier Vilela wrote:
>
> > kkk, I think it's enough for me.
> > I believe that PostgreSQL will not run on the ISS yet.
>
> Actually, I believe there ar
Em ter., 25 de ago. de 2020 às 23:02, Kyotaro Horiguchi <
horikyota@gmail.com> escreveu:
> At Tue, 25 Aug 2020 10:20:07 -0300, Ranier Vilela
> wrote in
> > Hi Tom,
> >
> > Per Coverity.
> >
> > The function parse_hba_auth_op at (src/backend/lib
/backend/postmaster/postmaster.c:884:7
Ranier Vilela
ointer passed as argument 2, which
is declared to never be null
I stopped counting clog.c (299).
If anyone wants, the full report, it has 2mb.
Ranier Vilela
>checking for libxml/parser.h... no
>configure: error: header file is required for XML support
sudo yum install libxml2-devel
You need to install the development package before ./configure.
regards,
Ranier Vilela
Em qui., 27 de ago. de 2020 às 12:46, Tom Lane escreveu:
> Ranier Vilela writes:
> > Is this something to worry about, or is it another problem with the
> > analysis tool, that nobody cares about?
>
> As far as the first one goes, I'd bet on buggy analysis tool.
>
Em qui., 27 de ago. de 2020 às 13:57, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-27, Ranier Vilela wrote:
>
> > indexcmds.c (1162):
> > memcpy(part_oids, partdesc->oids, sizeof(Oid) * nparts);
>
> Looks legit, and at least per commit 1
Em qui., 27 de ago. de 2020 às 13:57, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-27, Ranier Vilela wrote:
>
> > indexcmds.c (1162):
> > memcpy(part_oids, partdesc->oids, sizeof(Oid) * nparts);
>
> Looks legit, and at least per commit 1
ccess/transam/xlog.c:5194
This line solve the alert:
(xlog.c) 5193:
memset(&checkPoint, 0, sizeof(checkPoint));
I'm starting to doubt this tool.
regards,
Ranier Vilela
Hi,
Per Coverity.
When "Prepare for toasting", it is necessary to turn off the flag
TOAST_NEEDS_DELETE_OLD,
if there is no need to delete external values from the old tuple, otherwise,
there are dereference NULL at toast_helper.c (on toast_tuple_cleanup
function).
regards,
Ran
Em sex., 28 de ago. de 2020 às 04:45, escreveu:
>
>
>
>
>
> ‐‐‐ Original Message ‐‐‐
> On Friday, 28 August 2020 03:22, Ranier Vilela
> wrote:
>
> > Hi,
> >
> > Per Coverity.
> >
> > When "Prepare for toasting", it is ne
IdSetPageStatus was
not called in these cases, memcmp, it would not have to deal with the NULL
pointer.
regards,
Ranier Vilela
amp;5
>
> conftest.c: In function 'main':
>
> *conftest.c:76:20: error: expected expression before ')' token*
>
> *if (sizeof ((_Bool)))*
>
> * ^*
>
> *configure:12910: $? = 1*
>
> *configure: failed program was:*
>
> *| /* confdefs.h */*
>
What version of gcc is being used in this environment?
regards,
Ranier Vilela
em sex., 28 de ago. de 2020 às 11:05, Ranier Vilela
escreveu:
> Em sex., 28 de ago. de 2020 às 04:37, Sachin Khanna <
> sachin_kha...@infosys.com> escreveu:
>
>>
>>
>> Now I can see the that libraries are identified in config.log . I also
>> found s
s for which we're adjusting clog should be
* on the same page. Check those conditions, too.
*/
- if (all_xact_same_page && xid == MyProc->xid &&
+ if (all_xact_same_page && subxids && xid == MyProc->xid &&
nsubxids <= THRESHOLD_SUBTRANS_CLOG_OPT &&
nsubxids == MyProc->subxidStatus.count &&
memcmp(subxids, MyProc->subxids.xids,
regards,
Ranier Vilela
rom before
relfrozenxid 4244967300
2020-08-31 12:46:30.423 -03 [8908] CONTEXT: while scanning block 0 and
offset 1 of relation "pg_catalog.pg_depend"
2020-08-31 12:46:30.423 -03 [8908] STATEMENT: VACUUM FREEZE;
Most of the time:
id1=498
id2=498
diff32=0
diff64=0
id1=498
id2=498
diff32=0
diff64=0
regards,
Ranier Vilela
Em seg., 31 de ago. de 2020 às 14:00, Alvaro Herrera <
alvhe...@2ndquadrant.com> escreveu:
> On 2020-Aug-31, Ranier Vilela wrote:
>
> > More troubles with undefined-behavior.
> >
> > This type of code can leaves overflow:
> > var = (cast) (expression);
> &g
Em seg., 31 de ago. de 2020 às 14:43, Ranier Vilela
escreveu:
> Em seg., 31 de ago. de 2020 às 14:00, Alvaro Herrera <
> alvhe...@2ndquadrant.com> escreveu:
>
>> On 2020-Aug-31, Ranier Vilela wrote:
>>
>> > More troubles with undefined-behavior.
>> &g
avior. At least Ranier's sample output didn't seem to
> indicate it.
>
4294901763 can not store at unsigned int (TransactionID is uint32_t).
TransactionId id2 at TransactionIdPrecedes already has an overflow, before
anything is done.
Ranier Vilela
tion
> > (see -fsanitize=implicit-conversion).
>
> So it seems Rainier needs to turn this test off, because it actually is
> intentional.
>
No problem.
If intentional, the code at TransactionIdPrecedes, already knows that
overflow can occur
and trusts that the compiler will save it.
Ranier Vilela
d) at runtime (release version).
itemptr.h:
#define ItemPointerCopy(fromPointer, toPointer) \
( \
AssertMacro(PointerIsValid(toPointer)), \
AssertMacro(PointerIsValid(fromPointer)), \
*(toPointer) = *(fromPointer) \
)
regards,
Ranier Vilela
ItemPointerGetBlockNumberNoCheck(pointer) \
( \
BlockIdGetBlockNumber(&(pointer)->ip_blkid) \
)
#define ItemPointerGetOffsetNumberNoCheck(pointer) \
( \
(pointer)->ip_posid \
)
regards,
Ranier Vilela
> 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
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 sa
Em qui., 3 de set. de 2020 às 23:57, Bruce Momjian
escreveu:
> On Wed, Apr 1, 2020 at 08:57:18AM -0300, Ranier Vilela wrote:
> > Hi,
> > New patch with yours suggestions.
>
> Patch applied to head, thanks.
>
Thank you Bruce.
regards,
Ranier Vilela
Em sex., 4 de set. de 2020 às 11:01, Bruce Momjian
escreveu:
> On Fri, Sep 4, 2020 at 09:39:45AM -0300, Ranier Vilela wrote:
> > Em qui., 3 de set. de 2020 às 23:57, Bruce Momjian
> escreveu:
> >
> > On Wed, Apr 1, 2020 at 08:57:18AM -0300, Ranier Vilela wrote:
>
s sent but did not make the list.
Would you mind taking a look?
Certainly, if accepted, rebasing would have to be done.
regards,
Ranier Vilela
variables_assigned_unused_value.patch
Description: Binary data
Em sex., 4 de set. de 2020 às 18:20, Ranier Vilela
escreveu:
> Em sex., 4 de set. de 2020 às 14:40, Tom Lane
> escreveu:
>
>> Bruce Momjian writes:
>> > I have to say, I am kind of stumped why compilers do not warn of such
>> > cases, and why we haven't g
Em sáb., 5 de set. de 2020 às 14:29, Tom Lane escreveu:
> Ranier Vilela writes:
> > Attached is a patch I made in March/2020, but due to problems,
> > it was sent but did not make the list.
> > Would you mind taking a look?
>
> I applied some of this, but other
;
char d_name[MAX_PATH];
};
Or even better if possible:
struct dirent
{
char d_name[MAX_PATH];
long d_ino;
unsigned short d_reclen;
unsigned short d_namlen;
unsigned char d_type;
};
regards,
Ranier Vilela
v4-0001-Skip-unnecessary-stat-calls-in-walkdir.patch
Description: Binary data
v4
Em sex., 26 de jun. de 2020 às 08:21, Ranier Vilela
escreveu:
> Em qui., 11 de jun. de 2020 às 10:28, Ranier Vilela
> escreveu:
>
>> Em qui., 11 de jun. de 2020 às 10:01, Andrew Dunstan <
>> andrew.duns...@2ndquadrant.com> escreveu:
>>
>>>
>>>
Em ter., 2 de nov. de 2021 às 15:33, Andres Freund
escreveu:
> On 2021-11-02 13:43:46 -0400, Tom Lane wrote:
> > Ranier Vilela writes:
> > > It seems that 1ec7679f1b67e84be688a311dce234eeaa1d5de8 caused the
> problem.
> >
> > Indeed. Fix pushed.
>
> T
Hi,
Can anyone check this bug fix?
Thanks.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\commands\event_trigger.c Mon Sep 30
17:06:55 2019
+++ event_trigger.c Mon Nov 11 13:52:35 2019
@@ -171,7 +171,7 @@
HeapTuple tuple;
Oid funcoid
] = {InvalidOid}; /* dummy */
Oid evtowner = GetUserId();
ListCell *lc;
List *tags = NULL;
De: Michael Paquier
Enviado: terça-feira, 12 de novembro de 2019 03:31
Para: Ranier Vilela
Cc: pgsql-hackers@lists.postgresql.org
Assunto: Re: [BUG FIX] Uninitialized var
Hi,
ExecClearTuple don't check por NULL pointer arg and according
TupIsNull slot can be NULL.
Can anyone check this buf fix?
--- \dll\postgresql-12.0\a\backend\executor\nodeUnique.cMon Sep 30
17:06:55 2019
+++ nodeUnique.cTue Nov 12 09:54:34 2019
@@ -74,7 +74,8 @@
least 2 more possible cases, envolving ExecClearTuple:
nodeFunctionscan.c and nodeWindowAgg.c
Best regards,
Ranier Vilela
De: Daniel Gustafsson
Enviado: terça-feira, 12 de novembro de 2019 13:43
Para: Ranier Vilela
Cc: PostgreSQL Hackers
Assunto: Re: [
Hi,
Var TargetEntry *tle;
Have several paths where can it fail.
Can anyone check this bug fix?
--- \dll\postgresql-12.0\a\backend\parser\parse_expr.c Mon Sep 30 17:06:55 2019
+++ parse_expr.cTue Nov 12 12:43:07 2019
@@ -349,6 +349,7 @@
errmsg("DEF
" is > 0, naturally.
That way we can improve the function and avoid calling and setting
unnecessarily!
Bonus: silent compiler warning potential null pointer derenferencing.
Best regards,
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\access\transam\xact.cMon Sep 30
17:06:55
avoid leakage */
if (s->childXids != NULL) // Check null pointer!
pfree(s->childXids);
/* We must reset these to avoid double-free if fail later in commit */
s->childXids = NULL; // ever set to 0
s->nChildXids = 0; // ever set to
Hi,
Last time, I promise.
It's probably not happening, but it can happen, I think.
Best regards.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\access\brin\brin_validate.c Mon Sep 30
17:06:55 2019
+++ brin_validate.c Fri Nov 15 08:14:58 2019
@@ -57,8 +57,10 @@
/* Fetch op
Hi,
Thank you for the explanation.
Best regards.
Ranier Vilela
De: Daniel Gustafsson
Enviado: sexta-feira, 15 de novembro de 2019 11:58
Para: Ranier Vilela
Cc: pgsql-hackers@lists.postgresql.org
Assunto: Re: [PATCH][BUG FIX] Unsafe access pointers.
>
Hi,
Typo mystake?
Memset only fill a pointer size, not the size of struct.
Best regards.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\access\rmgrdesc\xactdesc.c Mon Sep 30
17:06:55 2019
+++ xactdesc.c Fri Nov 22 13:40:13 2019
@@ -35,7 +35,7 @@
{
char *data = ((char
Hi,
Pointer addition with NULL, is technically undefined behavior.
Best regards.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\access\transam\xlog.cMon Sep 30
17:06:55 2019
+++ xlog.c Fri Nov 22 13:57:17 2019
@@ -1861,7 +1861,7 @@
{
Assert
Hi,
Typo mystake?
Pointer var initilialized with boolean.
Best regards.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\commands\trigger.c Mon Sep 30 17:06:55 2019
+++ trigger.c Fri Nov 22 14:20:56 2019
@@ -2536,7 +2536,7 @@
TupleTableSlot *slot
Hi,
Maybe it doesn't matter, but, I think it's worth discussing.
The expression "if(pstate)" is redundant or is possible null dereference.
Best regards.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\commands\copy.c Mon Sep 30 17:06:55 2019
+++ copy.c Fri
Hi,
Maybe this is a real bug.
The assignment has no effect, or forget dereferencing it?
Best regards.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\commands\lockcmds.c Mon Sep 30 17:06:55 2019
+++ lockcmds.c Fri Nov 22 18:45:01 2019
@@ -285,7 +285,7 @@
LockViewRecurse_walker
Hi,
Remove redutant test.
best regards.
Ranier Vilela
--- \dll\postgresql-12.0\a\backend\executor\execExpr.c Mon Sep 30 17:06:55 2019
+++ execExpr.c Fri Nov 22 18:50:32 2019
@@ -2426,7 +2426,7 @@
{
desc = parent->scandesc;
- if (parent && pare
Hi,
Redudant because he it's been dereferenced here:
line 3410:
cstate = BeginCopy(pstate, true, rel, NULL, InvalidOid, attnamelist,
options);
Best regards.
Ranier Vilela
De: Tomas Vondra
Enviado: sexta-feira, 22 de novembro de 2019 22:05
(ERRCODE_SYNTAX_ERROR),
errmsg("conflicting or
redundant options"),
parser_errposition(pstate,
defel->location)));
best regards.
Ranier Vilela
Hi,
This is real bug? firsttupleslot == NULL.
\backend\executor\nodeGroup.c
if (TupIsNull(firsttupleslot))
{
outerslot = ExecProcNode(outerPlanState(node));
if (TupIsNull(outerslot))
{
/* empty input, so return
Hi,
Sorry, you are right.
Had not seen this line:
firsttupleslot = node->ss.ss_ScanTupleSlot;
Best regards.
Ranier Vilela
De: Tomas Vondra
Enviado: sexta-feira, 22 de novembro de 2019 22:54
Para: Ranier Vilela
Cc: pgsql-hack...@postgresql.org
Assunto:
1 - 100 of 961 matches
Mail list logo