Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VatUi-0000Gc-Kb for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2013 20:33:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VatUh-0003kN-VL for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2013 20:33:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VatUf-0003iZ-Vm for pgsql-hackers@postgresql.org; Mon, 28 Oct 2013 20:32:58 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VatUc-0000Rg-Oz for pgsql-hackers@postgresql.org; Mon, 28 Oct 2013 20:32:57 +0000 Received: from anarazel.de (p5DDC7390.dip0.t-ipconnect.de [93.220.115.144]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MHttJ-1VXrce2wc1-003Jak; Mon, 28 Oct 2013 21:32:54 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 12E1D102004; Mon, 28 Oct 2013 21:32:53 +0100 (CET) Date: Mon, 28 Oct 2013 21:32:53 +0100 From: Andres Freund To: Tom Lane Cc: Andrew Dunstan , Robert Haas , "pgsql-hackers@postgresql.org" , Matthias Schmitt Subject: Re: OSX doesn't accept identical source/target for strcpy() anymore Message-ID: <20131028203253.GH20248@awork2.anarazel.de> References: <55D64809-F305-41A9-946B-8EAFF88FBE3B@mmp.lu> <20131028153750.GH5577@awork2.anarazel.de> <934199A3-FF2F-4E5E-A8FF-E6F621B6F64D@mmp.lu> <20131028161132.GA14980@awork2.anarazel.de> <7718.1382983872@sss.pgh.pa.us> <20131028182653.GD20248@awork2.anarazel.de> <526EB8F4.2070806@dunslane.net> <20131028194609.GA16709@awork2.anarazel.de> <10044.1382990556@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10044.1382990556@sss.pgh.pa.us> X-Provags-ID: V02:K0:+5HgNwwPSGpHInguwHi5TOcso/Jp/QEjEtO6McsC95Q 4kW2sPmXwQI+3EWcFUtDCO+7ooLn78BTYrKWr1iyrJgag+DIDG UXHSpjQ5mVQ5PaM3RlhTJlkOPpsrC0dCM+Uz4jldK5H5IgVRJq okoZulGl7qQHdAId3m1K0Ogu/0Qy37C5NEG+Nv+/ltxnTECGPH DbPqQkjRf1mqB1P2Aer1oZdp8K/avAuG5Qjtdu+1NYmhK6VjOT chAqte8wurX65sgoxblWpn+PLK+foOwBq8ESbUXIWWWnnOZjeg dYNkXSKTxfUonS2R1BX1Mg7yxx646Jra6MVc1O62MFRm+7N9O+ NfH+8wuCjYvo52HacHPZhzVSd+4s8YJhmv/B6B6El X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2013-10-28 16:02:36 -0400, Tom Lane wrote: > Andres Freund writes: > > It'd be relatively easy to add support for make check (not installcheck) > > wrapping postgres in valgrind via pg_regress, but I am not sure that's > > the best way to go. > > > I think defining an additional CFLAG (USE_VALGRIND) shouldn't be a > > problem? > > CFLAGS doesn't seem to have anything to do with this. I'd be more > inclined to add a "--wrapper=prog" argument to pg_regress and invoke > it with something like --wrapper="valgrind --trace-children=yes". Err. I am *obviously* not saying that it makes the backend run under valgrind. But if we're going to have a buildfarm animal running valgrind, it'd be useful to run to let it catch all errors it can instead of hiding many of them via mcxt/aset.c? Right? > The larger problem though is what you'd do with the output. There's > enough false-positive noise from valgrind that I can't see having > the buildfarm run just fail if there are any messages. What to do > instead isn't very clear. The false positives should be gone using the suppressions file we ship these days (--suppressions=/path/to/pg/src/tools/valgrind.supp). We might miss some more cases there, but it should be fairly easy to extend it. > It seems to me the most reasonable fix for this is to make > TupleDescInitEntry notice that the passed "attributeName" points > at the tupdesc's name field and not call namestrcpy if so. > This would go with an API clarification stating that callers can > pass that if they want the name field to be unchanged. +1 > Another possibly-useful approach would be to hack namestrcpy itself > to handle name == str specially. However, that's legitimizing a > usage that's really a type cheat, so I don't like it as much, even > though it might fix more cases besides this one. -1 Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers