{"thread":{"id":"17592","subject":"[PATCH] valgrind: do not require valgrind 3.4.0 or newer","startedAt":"2009-02-05T18:34:27Z","lastAt":"2009-02-06T00:52:45Z","messageCount":9,"participants":["Johannes Schindelin","Peter Baumann","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"103369","messageId":"b204f01577584835f1c0252c77ffbfab33442a79.1233858507u.git.johannes.schindelin@gmx.de","threadId":"17592","inReplyTo":"cover.1233858507u.git.johannes.schindelin@gmx.de","subject":"[PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-05T18:34:27Z","receivedAt":"2009-02-05T18:34:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\nfeature, it is not the end of the world if that is not available.  So\nplay nice and use that option only when only an older version of\nvalgrind is available.\n\nIn the same spirit, refrain from the use of '...' in suppression\nfiles, which is also a feature only valgrind 3.4 and newer understand.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tThis patch is on top of my valgrind series.\n\n\tIn related news, Mark Adler has prepared a patch for the zlib vs \n\tvalgrind issue which has a low impact on performance, yet keeps \n\tvalgrind happy.\n\n\tI fully expect this patch to hit the next zlib version.\n\n\tNote that with the current suppressions, there was only a \n\thard-to-fix issue with certain gcc compilers in conjunction with \n\t-DUNALIGNED_OK -O3 flags when compiling zlib, so not many users \n\tare affected anyway (ahem, except for all the Ubuntu users, ahem).\n\n t/valgrind/default.supp |    4 +++-\n t/valgrind/valgrind.sh  |    8 +++++++-\n 2 files changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/t/valgrind/default.supp b/t/valgrind/default.supp\nindex 5f341b8..9e013fa 100644\n--- a/t/valgrind/default.supp\n+++ b/t/valgrind/default.supp\n@@ -38,6 +38,8 @@\n \twriting-data-from-zlib-triggers-even-more-errors\n \tMemcheck:Param\n \twrite(buf)\n-\t...\n+\tobj:/lib/ld-*.so\n+\tfun:write_in_full\n+\tfun:write_buffer\n \tfun:write_loose_object\n }\ndiff --git a/t/valgrind/valgrind.sh b/t/valgrind/valgrind.sh\nindex dc92612..a77023a 100755\n--- a/t/valgrind/valgrind.sh\n+++ b/t/valgrind/valgrind.sh\n@@ -2,11 +2,17 @@\n \n base=$(basename \"$0\")\n \n+TRACK_ORIGINS=\n+case \"$(valgrind --version)\" in\n+valgrind-{3.[4-9],3.[1-3][0-9],[4-9],[1-3][0-9]}*)\n+\tTRACK_ORIGINS=--track-origins=yes\n+esac\n+\n exec valgrind -q --error-exitcode=126 \\\n \t--leak-check=no \\\n \t--suppressions=\"$GIT_VALGRIND/default.supp\" \\\n \t--gen-suppressions=all \\\n-\t--track-origins=yes \\\n+\t$TRACK_ORIGINS \\\n \t--log-fd=4 \\\n \t--input-fd=4 \\\n \t$GIT_VALGRIND_OPTIONS \\\n-- \n1.6.1.1.598.g140d5\n"},{"id":"103371","messageId":"20090205190059.GA16216@m62s10.vlinux.de","threadId":"17592","inReplyTo":"b204f01577584835f1c0252c77ffbfab33442a79.1233858507u.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Peter Baumann","fromEmail":"waste.manager@gmx.de","sentAt":"2009-02-05T19:00:59Z","receivedAt":"2009-02-05T19:00:59Z","isPatch":true,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"On Thu, Feb 05, 2009 at 07:34:27PM +0100, Johannes Schindelin wrote:\n> Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\n> feature, it is not the end of the world if that is not available.  So\n> play nice and use that option only when only an older version of\n> valgrind is available.\n\nReading the patch/the sentence above suggests that you actuallly ment: \n\n\"So play nice and don't use that option when only an older version of\n valgrind is available.\"\n\nGreetings,\nPeter\n"},{"id":"103377","messageId":"alpine.DEB.1.00.0902052120130.7491@intel-tinevez-2-302","threadId":"17592","inReplyTo":"20090205190059.GA16216@m62s10.vlinux.de","subject":"Re: [PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-05T20:20:24Z","receivedAt":"2009-02-05T20:20:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Feb 2009, Peter Baumann wrote:\n\n> On Thu, Feb 05, 2009 at 07:34:27PM +0100, Johannes Schindelin wrote:\n> > Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\n> > feature, it is not the end of the world if that is not available.  So\n> > play nice and use that option only when only an older version of\n> > valgrind is available.\n> \n> Reading the patch/the sentence above suggests that you actuallly ment: \n> \n> \"So play nice and don't use that option when only an older version of\n>  valgrind is available.\"\n\nYes.  How did you guess?\n\n:-)\n\nCiao,\nDscho\n"},{"id":"103382","messageId":"7vzlh0bp6f.fsf@gitster.siamese.dyndns.org","threadId":"17592","inReplyTo":"b204f01577584835f1c0252c77ffbfab33442a79.1233858507u.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-05T20:32:08Z","receivedAt":"2009-02-05T20:32:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\n> feature, it is not the end of the world if that is not available.  So\n> play nice and use that option only when only an older version of\n> valgrind is available.\n\ns/older/newer/?\n\n> +TRACK_ORIGINS=\n> +case \"$(valgrind --version)\" in\n> +valgrind-{3.[4-9],3.[1-3][0-9],[4-9],[1-3][0-9]}*)\n> +\tTRACK_ORIGINS=--track-origins=yes\n> +esac\n\nWhat kind of case pattern is that?\n"},{"id":"103387","messageId":"alpine.DEB.1.00.0902052150230.7491@intel-tinevez-2-302","threadId":"17592","inReplyTo":"7vzlh0bp6f.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-05T20:51:23Z","receivedAt":"2009-02-05T20:51:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Feb 2009, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\n> > feature, it is not the end of the world if that is not available.  So\n> > play nice and use that option only when only an older version of\n> > valgrind is available.\n> \n> s/older/newer/?\n\ns/only an older/a newer/  even.\n\n> > +TRACK_ORIGINS=\n> > +case \"$(valgrind --version)\" in\n> > +valgrind-{3.[4-9],3.[1-3][0-9],[4-9],[1-3][0-9]}*)\n> > +\tTRACK_ORIGINS=--track-origins=yes\n> > +esac\n> \n> What kind of case pattern is that?\n\nA non-working one.\n\nGrumbles,\nDscho\n"},{"id":"103393","messageId":"349b2bb9b8f5a6762cccb7834d82125ee4382436.1233867737u.git.johannes.schindelin@gmx.de","threadId":"17592","inReplyTo":"7vzlh0bp6f.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-05T21:03:00Z","receivedAt":"2009-02-05T21:03:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\nfeature, it is not the end of the world if that is not available.  So\nplay nice and use that option only when only an older version of\nvalgrind is available.\n\nIn the same spirit, refrain from the use of '...' in suppression\nfiles, which is also a feature only valgrind 3.4 and newer understand.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/valgrind/default.supp |    4 +++-\n t/valgrind/valgrind.sh  |   11 ++++++++++-\n 2 files changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/t/valgrind/default.supp b/t/valgrind/default.supp\nindex 5f341b8..9e013fa 100644\n--- a/t/valgrind/default.supp\n+++ b/t/valgrind/default.supp\n@@ -38,6 +38,8 @@\n \twriting-data-from-zlib-triggers-even-more-errors\n \tMemcheck:Param\n \twrite(buf)\n-\t...\n+\tobj:/lib/ld-*.so\n+\tfun:write_in_full\n+\tfun:write_buffer\n \tfun:write_loose_object\n }\ndiff --git a/t/valgrind/valgrind.sh b/t/valgrind/valgrind.sh\nindex dc92612..582b4dc 100755\n--- a/t/valgrind/valgrind.sh\n+++ b/t/valgrind/valgrind.sh\n@@ -2,11 +2,20 @@\n \n base=$(basename \"$0\")\n \n+TRACK_ORIGINS=\n+\n+VALGRIND_VERSION=$(valgrind --version)\n+VALGRIND_MAJOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*\\([0-9]*\\)')\n+VALGRIND_MINOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*[0-9]*\\.\\([0-9]*\\)')\n+test 3 -gt \"$VALGRIND_MAJOR\" ||\n+test 3 -eq \"$VALGRIND_MAJOR\" -a 4 -gt \"$VALGRIND_MINOR\" ||\n+TRACK_ORIGINS=--track-origins=yes\n+\n exec valgrind -q --error-exitcode=126 \\\n \t--leak-check=no \\\n \t--suppressions=\"$GIT_VALGRIND/default.supp\" \\\n \t--gen-suppressions=all \\\n-\t--track-origins=yes \\\n+\t$TRACK_ORIGINS \\\n \t--log-fd=4 \\\n \t--input-fd=4 \\\n \t$GIT_VALGRIND_OPTIONS \\\n-- \n1.6.1.1.636.gf819e\n"},{"id":"103407","messageId":"7vljska0ep.fsf@gitster.siamese.dyndns.org","threadId":"17592","inReplyTo":"349b2bb9b8f5a6762cccb7834d82125ee4382436.1233867737u.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-06T00:12:30Z","receivedAt":"2009-02-06T00:12:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\n> feature, it is not the end of the world if that is not available.  So\n> play nice and use that option only when only an older version of\n> valgrind is available.\n>\n> In the same spirit, refrain from the use of '...' in suppression\n> files, which is also a feature only valgrind 3.4 and newer understand.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThanks.\n\n> +TRACK_ORIGINS=\n> +\n> +VALGRIND_VERSION=$(valgrind --version)\n> +VALGRIND_MAJOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*\\([0-9]*\\)')\n> +VALGRIND_MINOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*[0-9]*\\.\\([0-9]*\\)')\n> +test 3 -gt \"$VALGRIND_MAJOR\" ||\n> +test 3 -eq \"$VALGRIND_MAJOR\" -a 4 -gt \"$VALGRIND_MINOR\" ||\n> +TRACK_ORIGINS=--track-origins=yes\n\nIt took me a while to convince myself that\n\n\t\"3 > major || (3 == major && 4 > minor) || do-this\"\n\nis equivalent to\n\n\t\"if (3 < major || (3 == major && 4 <= minor)) { do-this }\"\n\nwhich would be:\n\n\tif test 3 -lt \"$VALGRIND_MAJOR\" ||\n           test 3 -eq \"$VALGRIND_MAJOR\" -a 4 -le \"$VALGRIND_MINOR\"\n        then\n\t\tTRACK_ORIGINS=--track-origins=yes\n\tfi\n        \nor more commonly:\n\n\tif test \"$VALGRIND_MAJOR\" -gt 3 ||\n           test \"$VALGRIND_MAJOR\" -eq 3 -a \"$VALGRIND_MINOR\" -ge 4\n        then\n\t\tTRACK_ORIGINS=--track-origins=yes\n\tfi\n        \n"},{"id":"103410","messageId":"alpine.DEB.1.00.0902060139490.10279@pacific.mpi-cbg.de","threadId":"17592","inReplyTo":"7vljska0ep.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-06T00:40:02Z","receivedAt":"2009-02-06T00:40:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Feb 2009, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\n> > feature, it is not the end of the world if that is not available.  So\n> > play nice and use that option only when only an older version of\n> > valgrind is available.\n> >\n> > In the same spirit, refrain from the use of '...' in suppression\n> > files, which is also a feature only valgrind 3.4 and newer understand.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> Thanks.\n> \n> > +TRACK_ORIGINS=\n> > +\n> > +VALGRIND_VERSION=$(valgrind --version)\n> > +VALGRIND_MAJOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*\\([0-9]*\\)')\n> > +VALGRIND_MINOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*[0-9]*\\.\\([0-9]*\\)')\n> > +test 3 -gt \"$VALGRIND_MAJOR\" ||\n> > +test 3 -eq \"$VALGRIND_MAJOR\" -a 4 -gt \"$VALGRIND_MINOR\" ||\n> > +TRACK_ORIGINS=--track-origins=yes\n> \n> It took me a while to convince myself that\n> \n> \t\"3 > major || (3 == major && 4 > minor) || do-this\"\n> \n> is equivalent to\n> \n> \t\"if (3 < major || (3 == major && 4 <= minor)) { do-this }\"\n> \n> which would be:\n> \n> \tif test 3 -lt \"$VALGRIND_MAJOR\" ||\n>            test 3 -eq \"$VALGRIND_MAJOR\" -a 4 -le \"$VALGRIND_MINOR\"\n>         then\n> \t\tTRACK_ORIGINS=--track-origins=yes\n> \tfi\n>         \n> or more commonly:\n> \n> \tif test \"$VALGRIND_MAJOR\" -gt 3 ||\n>            test \"$VALGRIND_MAJOR\" -eq 3 -a \"$VALGRIND_MINOR\" -ge 4\n>         then\n> \t\tTRACK_ORIGINS=--track-origins=yes\n> \tfi\n\nOkay.  Want me to resubmit?\n\nCiao,\nDscho\n"},{"id":"103413","messageId":"7vd4dw9yjm.fsf@gitster.siamese.dyndns.org","threadId":"17592","inReplyTo":"alpine.DEB.1.00.0902060139490.10279@pacific.mpi-cbg.de","subject":"Re: [PATCH] valgrind: do not require valgrind 3.4.0 or newer","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-06T00:52:45Z","receivedAt":"2009-02-06T00:52:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Thu, 5 Feb 2009, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n>> \n>> > Valgrind 3.4.0 is pretty new, and even if --track-origins is a nice\n>> > feature, it is not the end of the world if that is not available.  So\n>> > play nice and use that option only when only an older version of\n>> > valgrind is available.\n>> >\n>> > In the same spirit, refrain from the use of '...' in suppression\n>> > files, which is also a feature only valgrind 3.4 and newer understand.\n>> >\n>> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> \n>> Thanks.\n>> \n>> > +TRACK_ORIGINS=\n>> > +\n>> > +VALGRIND_VERSION=$(valgrind --version)\n>> > +VALGRIND_MAJOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*\\([0-9]*\\)')\n>> > +VALGRIND_MINOR=$(expr \"$VALGRIND_VERSION\" : '[^0-9]*[0-9]*\\.\\([0-9]*\\)')\n>> > +test 3 -gt \"$VALGRIND_MAJOR\" ||\n>> > +test 3 -eq \"$VALGRIND_MAJOR\" -a 4 -gt \"$VALGRIND_MINOR\" ||\n>> > +TRACK_ORIGINS=--track-origins=yes\n>> \n>> It took me a while to convince myself that\n>> \n>> \t\"3 > major || (3 == major && 4 > minor) || do-this\"\n>> \n>> is equivalent to\n>> \n>> \t\"if (3 < major || (3 == major && 4 <= minor)) { do-this }\"\n>> \n>> which would be:\n>> \n>> \tif test 3 -lt \"$VALGRIND_MAJOR\" ||\n>>            test 3 -eq \"$VALGRIND_MAJOR\" -a 4 -le \"$VALGRIND_MINOR\"\n>>         then\n>> \t\tTRACK_ORIGINS=--track-origins=yes\n>> \tfi\n>>         \n>> or more commonly:\n>> \n>> \tif test \"$VALGRIND_MAJOR\" -gt 3 ||\n>>            test \"$VALGRIND_MAJOR\" -eq 3 -a \"$VALGRIND_MINOR\" -ge 4\n>>         then\n>> \t\tTRACK_ORIGINS=--track-origins=yes\n>> \tfi\n>\n> Okay.  Want me to resubmit?\n\nNah, sorry for being unclear that I was only stating an observation, not\ncomplaints.\n"}]}