Re: [PATCH] pgAgent segfault

From: Dave Page <dave(dot)page(at)enterprisedb(dot)com>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pgAgent segfault
Date: 2018-06-11 16:14:24
Message-ID: CA+OCxoxMW=NwVVSdcquXZTquxdep1cHi4DGVap=xTeTtMJXkEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, patch applied.

On Mon, Jun 11, 2018 at 5:25 AM, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com
> wrote:

> Hi Dave,
>
> While debugging the issue
> <https://www.postgresql.org/message-id/CAG7mmoxXB0DsLZyvZ7qevoG17x7bJyw2DWdd0SXEgFg2Uc993A%40mail.gmail.com>
> reported by Rob, I found one segfault.
> Please find the attached patch to find that fix along with another one.
>
> 1. Connection object was being accessed, which was already released.
>
> 2. Changed the logic for checking the connection object existence.
>
> We're using "if (!ms_primaryCon)", which should convert the logic as
> boolean operator explicitly, which we defined for the 'DBconn' class.
>
> I suspect some compilers (specifically windows one) may not behave that
> way, and instead of using the boolean operator, it checks for the pointer
> is NULL or not.
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> <http://www.enterprisedb.com>
>
>
> *http://www.linkedin.com/in/asheshvashi*
> <http://www.linkedin.com/in/asheshvashi>
>

--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Joao De Almeida Pereira 2018-06-11 20:20:01 [pgadmin4][patch][GreenPlum] Display SQL for tables takes 15 minutes to execute
Previous Message Dave Page 2018-06-11 16:14:12 pgAgent commit: 1. Connection object was being accessed, which was alre