mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: musl and gcc-4.8 (sabotage)
Date: Fri, 29 Mar 2013 10:42:36 +0100	[thread overview]
Message-ID: <20130329094236.GD30576@port70.net> (raw)
In-Reply-To: <20130329000758.GD20323@brightrain.aerifal.cx>

* Rich Felker <dalias@aerifal.cx> [2013-03-28 20:07:58 -0400]:
> On Fri, Mar 29, 2013 at 12:58:43AM +0100, Daniel Cegie??ka wrote:
> > game over. libsanitizer requires pthread_getattr_np() but this
> > function isn't implemented in musl.
> 
> There's almost certainly a way to disable libsanitizer, no? It seems
> like gcc folks keep inventing new low-quality alternatives to
> valgrind...

asan+tsan are useful tools, but now looking into the code
it has unreliable c++ code and invalid assumptions about
the c runtime internals

but i still think it may worth trying to port it to musl
maybe musl can provide some hooks for similar tools
(weak symbol callbacks at the right places)

asan hooks into thread creation, so they should be able
to get the bottom of the stack and they can assume a
guard page at the end which can be found by vmfill or
parsing /proc smaps which they already do

tsan tries to get the tls as well with
void *get_tls_static_info_ptr = dlsym(RTLD_NEXT, "_dl_get_tls_static_info");
and then copy this onto a function pointer with
__attribute__((regparm(3), stdcall)) on i386

the rest should be portable


  reply	other threads:[~2013-03-29  9:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 20:38 Daniel Cegiełka
2013-03-28 23:32 ` John Spencer
2013-03-28 23:46   ` Daniel Cegiełka
2013-03-28 23:58     ` Daniel Cegiełka
2013-03-29  0:07       ` Rich Felker
2013-03-29  9:42         ` Szabolcs Nagy [this message]
2013-03-29  0:35       ` John Spencer
2013-03-29  1:39         ` Daniel Cegiełka
2013-03-29  1:56           ` Rich Felker
2013-03-29 11:07             ` Daniel Cegiełka
2013-03-29 11:25               ` Szabolcs Nagy
2013-03-29 14:13                 ` Daniel Cegiełka
2013-03-29 15:19                   ` Szabolcs Nagy
2013-03-29 15:38                     ` Daniel Cegiełka
2013-03-30  9:51                     ` Daniel Cegiełka
2013-03-29  2:10           ` John Spencer

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=20130329094236.GD30576@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).