Opened 8 years ago

Closed 8 years ago

#12638 closed defect (fixed)

Add some patches to the PARI sources

Reported by: jdemeyer Owned by: tbd
Priority: major Milestone: sage-5.0
Component: packages: standard Keywords:
Cc: Merged in: sage-5.0.beta12
Authors: Jeroen Demeyer Reviewers: Johan Bosman
Report Upstream: Reported upstream. Developers acknowledge bug. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

  1. GCC 4.6.3 miscompiles src/language/init.c on OS X 10.4 PPC (32-bit), because of a problem with pointer arithmetic in stack_base() called in pari_init_functions(). There is an easy work-around by reordering some code in the PARI sources. Related to #12369.

This is upstream bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330


  1. PARI's ispower() function gives wrong results when applied to negative numbers. Related to #12116.

This is fixed upstream http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1302


  1. issquarefree(0) raises an error instead of returning 0. See #12636.

This is fixed upstream http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1304


spkg: http://boxen.math.washington.edu/home/jdemeyer/spkg/pari-2.5.1.p3.spkg

Attachments (1)

pari-2.5.1.p3.diff (10.7 KB) - added by jdemeyer 8 years ago.
Diff for the PARI spkg (p0->p3). For review only

Download all attachments as: .zip

Change History (13)

comment:1 Changed 8 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 8 years ago by jdemeyer

  • Status changed from new to needs_review

Built successfully with SAGE_CHECK=yes using gcc-4.6.3 on OS X 10.4 PPC, a system where it failed before.

comment:3 Changed 8 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from needs_review to needs_work
  • Summary changed from Work-around GCC bug in PARI package to Add some patches to the PARI sources

comment:4 Changed 8 years ago by jdemeyer

  • Description modified (diff)

comment:5 Changed 8 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:6 Changed 8 years ago by jdemeyer

  • Description modified (diff)

comment:7 Changed 8 years ago by johanbosman

There's another Pari issue: #12636. Should that be mentioned in this ticket also?

comment:8 Changed 8 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from needs_review to needs_work

comment:9 Changed 8 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from needs_work to needs_review

Changed 8 years ago by jdemeyer

Diff for the PARI spkg (p0->p3). For review only

comment:10 Changed 8 years ago by johanbosman

  • Reviewers set to Johan Bosman
  • Status changed from needs_review to positive_review

All test pass, including the ones in the pari spkg. I haven't checked it on an OS X 10.4 PPC though, but I trust that you did that yourself. The code looks okay, and the fix resolves the issues 2 and 3.

comment:11 Changed 8 years ago by jdemeyer

Thank you for the review.

comment:12 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.0.beta12
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.