From: | Greg Stark <stark(at)mit(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: overlapping strncpy/memcpy errors via valgrind |
Date: | 2013-02-17 17:18:26 |
Message-ID: | CAM-w4HN2dN5iGwm-RajgmpzBb9F51HjnLBN_Qoht5ZH9PoLqpg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Feb 17, 2013 at 4:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> No, it'd be more like a micro-pessimization, because the test would be
> wasted effort in the vast majority of calls. The *only* reason to do
> this would be to shut up valgrind, and that seems annoying.
In terms of runtime I strongly suspect the effect would be 0 due to
branch prediction.
The effect on the code cleanliness seems like a stronger argument but
I have a hard time getting upset about a single one-line if statement
in namestrcpy. I suspect the argument may have been that we have no
reason to believe namestrcpy is the only place this can happen.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2013-02-17 18:19:31 | Re: JSON Function Bike Shedding |
Previous Message | Greg Stark | 2013-02-17 17:14:51 | Re: [RFC] indirect toast tuple support |