Re: pgsql: Fix another instance of unsafe coding for shm_toc_lookup failure

2018-02-04 Thread Thomas Munro
On Sat, Feb 3, 2018 at 3:08 PM, Tom Lane wrote: > Thomas Munro writes: >> However, it's not surprising that you drew the >> opposite conclusion (ie that it might in fact not be in the TOC), >> since the shm space is really only necessary for

Re: pgsql: Fix another instance of unsafe coding for shm_toc_lookup failure

2018-02-02 Thread Thomas Munro
On Sat, Feb 3, 2018 at 12:32 PM, Tom Lane wrote: > Fix another instance of unsafe coding for shm_toc_lookup failure. > > One or another author of commit 5bcf389ec seems to have thought that > computing an offset from a NULL pointer would yield another NULL pointer. > There may

pgsql: Fix another instance of unsafe coding for shm_toc_lookup failure

2018-02-02 Thread Tom Lane
Fix another instance of unsafe coding for shm_toc_lookup failure. One or another author of commit 5bcf389ec seems to have thought that computing an offset from a NULL pointer would yield another NULL pointer. There may possibly be architectures where that works, but common machines don't work