This is the same issue as reported to Fedora in the referred URL. Running Weston in Valgrind fails Valgrind itself, not only Weston.
I hear Fedora fixed this using the patch here:
According to the comments in the patch, you should be able to find the patch already merged upstream, so this is essentially just waiting for an upstream fix release. If you want, you could patch 3.11 in Gentoo too.
Steps to Reproduce:
1. Be in X, open an X terminal to run from.
2. Execute: $ valgrind -v weston
Weston starts to launch, creates an X11 window, and then Valgrind crashes with:
--4849:0: aspacem Valgrind: FATAL: aspacem assertion failed:
--4849:0: aspacem ! is_freeslot(ix)
--4849:0: aspacem at m_aspacemgr/aspacemgr-segnames.c:223 (get_refcount)
Valgrind to not fail assert.
My Weston is hand-built from source, upstream master branch. I would expect the failure to also occur on the packaged version. I have Intel graphics.