Re: 13.2-STABLE: vlc does not work (SEGV_MAPERR)

From: Peter <pmc_at_citylink.dinoex.sub.org>
Date: Tue, 07 Mar 2023 22:31:58 UTC
On Tue, Mar 07, 2023 at 03:43:15PM -0500, Ed Maste wrote:
! On Mon, 6 Mar 2023 at 09:18, Peter <pmc@citylink.dinoex.sub.org> wrote:
! >
! > Problem:
! > Some 1 or 2 minutes into the flight, vlc does continue to play A+V,
! > but the GUI does not react and does not get refreshed anymore. At
! > the same time, coredumps are generated (quite a lot of them).
! 
! I think I saw somewhere that you reported turning off ASLR avoids the problem.

Seems that worked ;)

! Can you try tagging the binary to opt out of ASLR and see if it then works:
! # elfctl -e +noaslr /usr/local/bin/vlc

I could, but I prefer to do this instead and have it logged rightaway:

diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile
index 4529d05caea5..c3df51cd2170 100644
--- a/multimedia/vlc/Makefile
+++ b/multimedia/vlc/Makefile
@@ -27,6 +27,8 @@ RUN_DEPENDS=  ffmpeg>=3.4.1,1:multimedia/ffmpeg
 
 USES=          compiler:c++17-lang cpe desktop-file-utils gettext-tools gmake gnome \
                iconv:wchar_t libtool localbase pathfix pkgconfig tar:xz
+USES+=         elfctl
+ELF_FEATURES+= +noaslr:bin/.libs/vlc
 
 CPE_VENDOR=    videolan


Looks good so far. The effect happens randomly in about 80% of
invocations (no idea about when and why), so no guarantee, but I don't
see reason why it shouldn't work.

I'm going to do the same now for java + node + libreoffice, and then
engage the allow_wx=0 again.

More interesting question is: what is actually going wrong with the
vlc binary? To get to a clue about what else might be concerned...

cheerio,
PMc