Thread

Commits

  1. Relocate a badly placed Assert in COPY FROM code

  1. Ineffective Assert-check in CopyMultiInsertInfoNextFreeSlot()

    Amul Sul <sulamul@gmail.com> — 2024-08-16T11:47:47Z

    Hi,
    
    The Assert(buffer != NULL) is placed after the buffer is accessed,
    which could lead to a segmentation fault before the check is executed.
    
    Attached a small patch to correct that.
    
    --
    Regards,
    Amul Sul
    EDB: http://www.enterprisedb.com
    
  2. Re: Ineffective Assert-check in CopyMultiInsertInfoNextFreeSlot()

    David Rowley <dgrowleyml@gmail.com> — 2024-08-16T22:38:37Z

    On Fri, 16 Aug 2024 at 23:48, Amul Sul <sulamul@gmail.com> wrote:
    > The Assert(buffer != NULL) is placed after the buffer is accessed,
    > which could lead to a segmentation fault before the check is executed.
    
    Yeah, that's not great. Technically the Assert does not add any value
    in terms of catching bugs in the code, but it's probably useful to
    keep it for code documentation purposes. A crash would occur even if
    the Assert wasn't there.
    
    > Attached a small patch to correct that.
    
    Pushed.
    
    David