From: Boris Egorov <egorov@linux.com>
To: Sami Kerola <kerolasa@iki.fi>, util-linux@vger.kernel.org
Subject: Re: [PATCH 0/6] pull: almost working AddressSanitizer support
Date: Tue, 11 Nov 2014 13:17:23 +0600 [thread overview]
Message-ID: <5461B803.4050707@linux.com> (raw)
In-Reply-To: <1415656195-20458-1-git-send-email-kerolasa@iki.fi>
Hello,
On 11/11/2014 03:49 AM, Sami Kerola wrote:
> The short description is: when the code is at very last line of mkswap at
> 'return EXIT_SUCCESS;' somehow the EXIT_SUCCESS is 1. If I change the
> 'return EXIT_SUCCESS;' to 'exit(EXIT_SUCCESS);' the return value stays
> expected. Possible explanations include:
That's interesting.
> 1. I'm doing something silly and/or wrong.
I doubt it.
> 2. This happens only on my laptop (or imagination). Please, let it not
> be this.
No, I can confirm: It works as you describe with clang-3.5.0 from Debian
Jessie. Returns 1 with ld.bfd too.
> 3. This is a bug in clang, llvm, and/or AddressSanitizer.
> clang / llvm version 3.5.0 from Archlinux packages 3.5.0-2.1
Probably it is.
> 4. With gcc 4.9.2 and the same CFLAGS the mkswap works.
Confirmed with gcc 4.9.1.
I found more info: problem connected with atexit(close_stdout). If I
comment this line, mkswap exits normally. Looks like close_stdout ends
successfully (I've made it not inline and checked it with gdb), but then
program exits with code 1.
Also, there is a problem building mkswap with clang on my machine.
autoconf test for HAVE_SCANF_MS_MODIFIER is incomplete. clang/llvm have
%m modifier (I've checked it), but this test fails to detect it. Test
for HAVE_SCANF_AS_MODIFIER fails too, I suppose. So when I build mkswap
I have an error:
lib/colors.c:620:19: error: use of undeclared identifier 'UL_SCNsA'
rc = sscanf(p, UL_SCNsA" " /* name */
So, we need to detect %m modifier with clang on build somehow.
PS. Forgot to add mail list on reply, resending message. Sorry for the
duplicate, Sami.
--
Best Regards,
Boris Egorov
next prev parent reply other threads:[~2014-11-11 7:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 21:49 [PATCH 0/6] pull: almost working AddressSanitizer support Sami Kerola
2014-11-10 21:49 ` [PATCH 1/6] build-sys: make scanf_cv_alloc_modifier to work [AddressSanitizer] Sami Kerola
2014-11-11 2:10 ` Mike Frysinger
2014-11-11 22:51 ` Sami Kerola
2014-11-10 21:49 ` [PATCH 2/6] tests: fix memory leak [AddressSanitizer] Sami Kerola
2014-11-10 21:49 ` [PATCH 3/6] tests: add mkswap size printout to expected output Sami Kerola
2014-11-10 21:49 ` [PATCH 4/6] libmount: fix memory overflow [AddressSanitizer] Sami Kerola
2014-11-18 12:06 ` Karel Zak
2014-11-10 21:49 ` [PATCH 5/6] tests: skip kill -SEGV test when running AddressSanitizer Sami Kerola
2014-11-10 21:49 ` [PATCH 6/6] tests: mark python libmount tests known to fail with AddressSanitizer Sami Kerola
2014-11-11 2:12 ` Mike Frysinger
2014-11-11 21:16 ` Sami Kerola
2014-11-11 7:17 ` Boris Egorov [this message]
2014-11-11 22:08 ` [PATCH 0/6] pull: almost working AddressSanitizer support Sami Kerola
2014-11-11 22:49 ` Sami Kerola
2014-11-12 14:25 ` Karel Zak
2014-11-12 15:02 ` Sami Kerola
2014-11-12 19:51 ` Mike Frysinger
2014-11-12 20:50 ` Sami Kerola
2014-11-13 14:48 ` Karel Zak
2014-11-12 21:08 ` Bernhard Voelker
2014-11-18 12:01 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5461B803.4050707@linux.com \
--to=egorov@linux.com \
--cc=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.