Package: src:r-cran-genabel
Version: 1.8-0-7
Severity: serious
Tags: ftbfs trixie sid

Dear maintainer:

Hi, I'm summitting a patch for fixing this FTBFS problem while building with R 
4.5.0 on Debian sid,trixie.

My patch Fix-FTBFS-error.patch replace Calloc() and Free() with R_Calloc() and 
R_Free(), accoding to the R-project's NEWS(R: R News 
<https://cran.r-project.org/doc/manuals/r-release/NEWS.html>)

And by the way, Please help me for uploading this patch to upstream if you 
think it's necessary.

Best regards,

liwenjun

Description: Fix FTBFS error on R 4.5.0
 This patch replace Calloc() and Free() to R_Calloc() R_Free() 
 for fixing FTBFS errors on DEBIAN sid, trixy.
 Accoding to the R-project's 
NEWS.(https://cran.r-project.org/doc/manuals/r-release/NEWS.html).
 R 4.5.0 has been changed those funtions.
Author: liwenjun <[email protected]>
Origin: other, None
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103201
Last-Update: 2025-04-16

--- r-cran-genabel-1.8-0.orig/src/fexact.c
+++ r-cran-genabel-1.8-0/src/fexact.c
@@ -178,7 +178,7 @@ fexact(int *nrow, int *ncol, int *table,
 //Maksim Struchalin, 14-June-2010:
 // In case of use R_alloc memory is freed only when routine .C finishes. We 
have got memorry leak in case when we call fexat in a loop "inside" ".C" .
 //    equiv = (double *) R_alloc(iwkmax / 2, sizeof(double));
-               equiv  = (double *) Calloc(iwkmax / 2, double); // call 
Free(equiv) at the end.
+               equiv  = (double *) R_Calloc(iwkmax / 2, double); // call 
R_Free(equiv) at the end.
 //_________________________________
 
 
@@ -302,7 +302,7 @@ fexact(int *nrow, int *ncol, int *table,
           dwrk + irwk);
 
 
-               Free(equiv);
+               R_Free(equiv);
 
     return;
 }

Reply via email to