Bug#1020436: giac failed tests with new pari

2022-10-21 Thread Ileana Dumitrescu
Hi Tobias,

> are you aware of the bug
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020436

> Bill posted a suggestion how to fix this test there yesterday.

Yes I saw the bug and initial comments by Bill but thanks for letting me know 
about Bill's latest comments.

I applied the patch from sagemath (define-anyarg.patch) and built giac 
1.9.0.21+dfsg2 in my pbuilder environment and was able to reproduce the 
chk_fhan4 seg fault from above. I added an additional patch 
(increase-pari-size.patch) to export PARI_SIZE=2048000 in chk_fhan4 as in 
Gonzalo Tornaria's comment here: https://trac.sagemath.org/ticket/34583. This 
allowed the build to complete without error on my pbuilder environment and I 
committed the changes to salsa. Please feel free to test and upload if the 
updates look good.

IleanaFrom 2238c88dbb3ea8eacd7b3d8f071cd8a977c47e98 Mon Sep 17 00:00:00 2001
From: Ileana Dumitrescu 
Date: Fri, 21 Oct 2022 16:41:42 +0300
Subject: [PATCH] define anyarg

---
 src/pari.cc | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/pari.cc b/src/pari.cc
index 76ce8e1..8d5b22b 100644
--- a/src/pari.cc
+++ b/src/pari.cc
@@ -39,6 +39,12 @@ using namespace std;
 #endif
 
 #ifdef HAVE_LIBPARI
+// ANYARG disappeared from PARI 2.15.0
+#ifdef __cplusplus
+# define ANYARG ...
+#else
+# define ANYARG
+#endif
 
 #ifdef HAVE_PTHREAD_H
 #include 
-- 
2.37.2

From f32439947309f276d963234c827c1e8918bb808c Mon Sep 17 00:00:00 2001
From: Ileana Dumitrescu 
Date: Fri, 21 Oct 2022 17:10:36 +0300
Subject: [PATCH] increase pari size

---
 check/chk_fhan4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/check/chk_fhan4 b/check/chk_fhan4
index 5d1e1e8..29429d3 100755
--- a/check/chk_fhan4
+++ b/check/chk_fhan4
@@ -1,4 +1,5 @@
 #! /bin/sh
 unset LANG
+export PARI_SIZE=2048000
 ../src/icas TP04-sol.cas > TP04.tst
 diff TP04.tst TP04-sol.cas.out1
-- 
2.37.2



Bug#1020436: giac failed tests with new pari

2022-10-20 Thread Tobias Hansen
Hi Ileana,

are you aware of the bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020436

Bill posted a suggestion how to fix this test there yesterday.

Best wishes,
Tobias

On 10/19/22 14:44, Ileana Dumitrescu wrote:
> Hi Julien,
>
> I applied pari.patch to fix the compile issues with new upstream version of 
> giac 1.9.0.21 and using new pari version 2.15.0. giac compiles without error 
> now, but I am seeing several errors from the test outputs, mostly 
> segmentation faults involving pari functions (see giac_test_failures.txt). I 
> think this is an issue with the pari library and not with pari.cc in giac. If 
> you can reproduce this and agree then I can write a bug for pari or any 
> action you think is best. But right now it is not ready for release.
>
> Ileana Dumitrescu
>
> GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354