Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2014 09:13:15 +0300
From:      Mikolaj Golub <to.my.trociny@gmail.com>
To:        Benjamin Kaduk <kaduk@MIT.EDU>
Cc:        Stanislav Sedov <stas@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: valgrind on amd64 crashes when delivering signal for threaded application
Message-ID:  <20140424061314.GA10637@gmail.com>
In-Reply-To: <alpine.GSO.1.10.1404232316020.21026@multics.mit.edu>
References:  <20140423200135.GA6009@gmail.com> <alpine.GSO.1.10.1404232316020.21026@multics.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 23, 2014 at 11:28:25PM -0400, Benjamin Kaduk wrote:

> I would expect that the fact that this patch fixes the observed crash 
> means that valgrind has a bug when setting up the stack for the signal 
> handler.  I had to work around an apparently similar bug in the built-in 
> lightweight thread implementation in net/openafs by forcing 
> -mstack-realign to be used for its compilation (because analyzing the 
> lightweight threads implementation when upstream is trying to switch to 
> pthreads is not worth the effort).  I guess here the thing to try would be 
> compiling libthr with -mstack-realign, not that that is a reasonable thing 
> to do in head.

Yes, compilng thr_sig.c with -mstackrealign helps too. I see
force_align_arg_pointer attribute mentioned in gcc manuals, which
should do the same per function, but get "unknown attribute
'force_align_arg_pointer' ignored" error when trying to declare
thr_sighandler() with it.

> Perhaps the valgrind upstream should be asked about the 
> details of the stack creation?

I am not sure who I should ask. It looks the ustream does not support
freebsd.

-- 
Mikolaj Golub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140424061314.GA10637>