Re: pkg/60059: math/gnumeric 10.0_2025Q4 segfaults on RPi4

"Ramiro Aceves via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.bugs
Message-ID <[email protected]>
The following reply was made to PR pkg/60059; it has been noted by GNATS.

From: Ramiro Aceves <[email protected]>
To: [email protected], [email protected], [email protected],
 [email protected]
Cc: 
Subject: Re: pkg/60059: math/gnumeric 10.0_2025Q4 segfaults on RPi4
Date: Wed, 11 Mar 2026 22:11:03 +0100

 El 11/3/26 a las 20:30, Benny Siegert via gnats escribió:
 > The following reply was made to PR pkg/60059; it has been noted by GNATS.
 > 
 > From: Benny Siegert <[email protected]>
 > To: Ramiro Aceves <[email protected]>
 > Cc: [email protected], [email protected], [email protected],
 >      [email protected]
 > Subject: Re: pkg/60059: math/gnumeric 10.0_2025Q4 segfaults on RPi4
 > Date: Wed, 11 Mar 2026 19:28:46 +0000 (UTC)
 > 
 >   >>  Changing from "long double" to "double" inside
 >   >>  fmt-fp function in the file
 >   >>  /usr/pkgsrc/misc/goffice0.10/work/goffice-0.10.60/goffice/math
 >   >>  fixes de crash.
 >   >>
 >   >>  I do not know how to properly fix it only for aarch64 and if it is a
 >   >>  proper fix.
 >   
 >   Thanks, this is actually helpful! At the risk of being flamed to death, I
 >   used Gemini to explain the cause of the crash. It suggests that this is a
 >   pointer underflow specifically on aarch64, because the calculation of the
 >   array size in that function is wrong. It suggests this patch:
 >   
 >   --- go-dtoa.c
 >   +++ go-dtoa.c
 >   @@ -227,7 +227,7 @@
 >     	if (y) y *= 0x1p28, e2-=28;
 >   
 >     	if (e2<0) a=r=z=big;
 >   -	else a=r=z=big+sizeof(big)/sizeof(*big) - LDBL_MANT_DIG - 1;
 >   +	else a=r=z=big+sizeof(big)/sizeof(*big) - (LDBL_MANT_DIG+28)/9 - 1;
 >   
 >     	do {
 >     		*z = y;
 >   
 >   It also suggests that the code is lifted from musl libc :)
 >   
 >   Can you try recompiling goffice0.10 with this change?
 >   
 >   Thanks!
 >   
 >   --
 >   Benny
 >   
 
 Hi Benny, many thanks for you help. I have tried to apply the patch but it does not apply to pkgsrc-current go-dtoa.c file (I did upgrade to -current 
 just goffice and gnumeric directories to test as someone pointed out. What version of pkgsrc should I have prior to patch application? 2025Q4? Tell me 
 please and I will downgrade both directories and apply the patch (only one line change but I want to do it well)
 
 Thanks so much.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.