Front page | perl.perl5.porters |
Postings from February 2014
Re: Smoke [smoke-me/davem/maint-5.18-charclass-hash]v5.18.2-7-g40e7e8d FAIL(F) linux 3.11.0-15-generic [debian] (x86_64/8 cpu){smoke-me_clang_quick_sanitize=address}
From:
Dave Mitchell
Date:
February 22, 2014 21:41
Subject:
Re: Smoke [smoke-me/davem/maint-5.18-charclass-hash]v5.18.2-7-g40e7e8d FAIL(F) linux 3.11.0-15-generic [debian] (x86_64/8 cpu){smoke-me_clang_quick_sanitize=address}
Message ID:
20140222214103.GO12844@iabyn.com
On Tue, Feb 18, 2014 at 09:02:00PM -0500, George Greer wrote:
> Smoke logs available at http://m-l.org/~perl/smoke/perl/linux/smoke-me_clang_quick_sanitize=address/David Mitchell/log40e7e8ddcdbe527e4aa0dc8f227459f5fd612139.log.gz
>
> Automated smoke report for 5.18.2 patch 40e7e8ddcdbe527e4aa0dc8f227459f5fd612139 v5.18.2-7-g40e7e8d
> zwei: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (GenuineIntel 2668MHz) (x86_64/8 cpu)
> on linux - 3.11.0-15-generic [debian]
> using clang version 4.2.1 Compatible Clang 3.5 (trunk 199025)
> smoketime 2 hours 11 minutes (average 32 minutes 57 seconds)
>
> Summary: FAIL(F)
>
> O = OK F = Failure(s), extended report at the bottom
> X = Failure(s) under TEST but not under harness
> ? = still running or test results not (yet) available
> Build failures during: - = unknown or N/A
> c = Configure, m = make, M = make (after miniperl), t = make test-prep
>
> v5.18.2-7-g40e7e8d Configuration (common) -Accflags="-DPERL_POISON -Werror=declaration-after-statement -fsanitize=address" -Aldflags="-fsanitize=address" -Dcc=clang
> ----------- ---------------------------------------------------------
> O O
> O F -Duseithreads
> | +--------- -DDEBUGGING
> +----------- no debugging
>
>
> Locally applied patches:
> SMOKE40e7e8ddcdbe527e4aa0dc8f227459f5fd612139
>
> Testsuite was run only with 'harness'
>
> Failures: (common-args) -Accflags="-DPERL_POISON -Werror=declaration-after-statement -fsanitize=address" -Aldflags="-fsanitize=address" -Dcc=clang
> [default] -DDEBUGGING -Duseithreads
> ../t/comp/fold.t............................................FAILED
> Non-zero exit status: 1
> No plan found in TAP output
> ../t/op/oct.t...............................................FAILED
> Non-zero exit status: 1
> No plan found in TAP output
> ../t/op/pack.t..............................................FAILED
> Non-zero exit status: 1
> No plan found in TAP output
> ../t/op/sprintf2.t..........................................FAILED
> 13
> ../t/uni/chr.t..............................................FAILED
> Non-zero exit status: 1
> No plan found in TAP output
> ../lib/warnings.t...........................................FAILED
> 117, 119-122, 124-125, 590, 595, 645, 648
> 652, 654, 754-758, 772-780
[ for people wanting to follow along, this is my recent commit on the
maint-5.18 branch, not blead. ]
I can reproduce thee failures under address sanitizer; but the failures
have been there since at least 5.18.0. They're not in blead. I bisected
and found the commit which fixed blead. I cherry-picked that commit into
maint-5.18 and indeed the failures about went away. However, the commit in
question makes *no* sense:
commit 79e2a32a095274dde38cabdeca03b580bd9733d7
Author: Steffen Mueller <smueller@cpan.org>
AuthorDate: Tue Jun 11 18:59:18 2013 +0200
Commit: Steffen Mueller <smueller@cpan.org>
CommitDate: Tue Jun 11 20:05:53 2013 +0200
Branch prediction hint for SvREFCNT_dec
When decrementing the refcount on an SV, we have to branch on whether or
not we've reached a refcount of 0. But a quick instrumentation shows
that in virtually any program small or large, the number of decrements
without freeing greatly outweighs the number of decrements that cause a
free. Therefore, it's a net win to suggest to the compiler to emit a
branch prediction hint to go into the just-decrement branch.
Affected files ...
M inline.h
Differences ...
diff --git a/inline.h b/inline.h
index 953bb33..29a15ac 100644
--- a/inline.h
+++ b/inline.h
@@ -67,7 +67,7 @@ S_SvREFCNT_dec(pTHX_ SV *sv)
{
if (LIKELY(sv != NULL)) {
U32 rc = SvREFCNT(sv);
- if (rc > 1)
+ if (LIKELY(rc > 1))
SvREFCNT(sv) = rc - 1;
else
Perl_sv_free2(aTHX_ sv, rc);
@@ -78,7 +78,7 @@ PERL_STATIC_INLINE void
S_SvREFCNT_dec_NN(pTHX_ SV *sv)
{
U32 rc = SvREFCNT(sv);
- if (rc > 1)
+ if (LIKELY(rc > 1))
SvREFCNT(sv) = rc - 1;
else
Perl_sv_free2(aTHX_ sv, rc);
This is with llvm/clang/asan freshly built from SVN today, @201936,
and building with:
sh Configure -des -Dusedevel -Dprefix=/home/davem/perl5/git/no-backup/maint-5.18.out -Uinstallusrbinperl -Doptimize='-O2' -Accflags="-ggdb -DPERL_POISON -Werror=declaration-after-statement -fsanitize=address" -Aldflags="-fsanitize=address" -Dcc=clang -DDEBUGGING -Duseithreads
I've also seen some weird effects, like recompiling the same src code (by
e.g. 'touch perl.h; make') will succeed where first time round the build
failed with some clang error.
Should I just put this all down to clang/asan weiredness and ignore it?
--
"But Sidley Park is already a picture, and a most amiable picture too.
The slopes are green and gentle. The trees are companionably grouped at
intervals that show them to advantage. The rill is a serpentine ribbon
unwound from the lake peaceably contained by meadows on which the right
amount of sheep are tastefully arranged." -- Lady Croom, "Arcadia"
-
Re: Smoke [smoke-me/davem/maint-5.18-charclass-hash]v5.18.2-7-g40e7e8d FAIL(F) linux 3.11.0-15-generic [debian] (x86_64/8 cpu){smoke-me_clang_quick_sanitize=address}
by Dave Mitchell