Re: git: f05f6dcedb5d - main - comms/gqrx: Turn off ASLR

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Mon, 05 Jun 2023 10:49:39 UTC
Hello Ganael,

I didn't know that were a way to disabling aslr in a port! This is really
nice.

I'm having a lot of segfaults and tab crashing on firefox @aarch64 and
mikael@ sugested turning it off to see if it fixes.
I will test first with sysctl aslr off and if it works I will test port
option.

So syntax is:

USES+= elfctl
ELF_FEATURES= +noasr:<path_to_something>?

Thanks,

Ganael LAPLANCHE <martymac@freebsd.org> escreveu no dia segunda, 5/06/2023
à(s) 11:20:

> The branch main has been updated by martymac:
>
> URL:
> https://cgit.FreeBSD.org/ports/commit/?id=f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c
>
> commit f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c
> Author:     Ganael LAPLANCHE <martymac@FreeBSD.org>
> AuthorDate: 2023-06-05 10:18:04 +0000
> Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
> CommitDate: 2023-06-05 10:18:04 +0000
>
>     comms/gqrx: Turn off ASLR
>
>     Disable ASLR to work around the following crash:
>
>     Program terminated with signal SIGSEGV, Segmentation fault.
>     Address not mapped to object.
>     --Type <RET> for more, q to quit, c to continue without paging--
>     0  0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma
> (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289)
> at
> /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_x2_dot_prod_32f.h:833
>     833             dotProduct += ((*aPtr++) * (*bPtr++));
>     [Current thread is 1 (LWP 126875)]
>     (gdb) bt
>     0  0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma
> (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289)
> at
> /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_x2_dot_prod_32f.h:833
>     1  0x000000082e776b17 in __volk_32f_x2_dot_prod_32f_a
> (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289)
> at /usr/ports/devel/volk/work/.build/lib/volk.c:5336
>     2  0x0000000825fe0b83 in gr::filter::kernel::fir_filter<float, float,
> float>::filterN(float*, float const*, unsigned long) () from
> /usr/local/lib/libgnuradio-filter.so.3.8.4
> ---
>  comms/gqrx/Makefile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/comms/gqrx/Makefile b/comms/gqrx/Makefile
> index 927e049b2774..2974b7542287 100644
> --- a/comms/gqrx/Makefile
> +++ b/comms/gqrx/Makefile
> @@ -1,6 +1,7 @@
>  PORTNAME=      gqrx
>  PORTVERSION=   2.16
>  DISTVERSIONPREFIX=     v
> +PORTREVISION=  1
>  PORTEPOCH=     1
>  CATEGORIES=    comms hamradio
>
> @@ -31,7 +32,9 @@ LIB_DEPENDS=  libgnuradio-runtime.so:comms/gnuradio \
>                 libjack.so:audio/jack \
>                 libportaudio.so:audio/portaudio
>
> -USES=          cmake compiler:c++11-lang gl pkgconfig qt:5
> +USES=          cmake compiler:c++11-lang elfctl gl pkgconfig qt:5
> +
> +ELF_FEATURES=  +noaslr:src/gqrx
>
>  USE_GITHUB=    yes
>  GH_ACCOUNT=    gqrx-sdr
>


-- 
Nuno Teixeira
FreeBSD Committer (ports)