valgrind on amd64 crashes when delivering signal for threaded application
Mikolaj Golub
to.my.trociny at gmail.com
Thu Apr 24 06:13:21 UTC 2014
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
More information about the freebsd-hackers
mailing list