Segmentation fault in mpz_ui_pow_ui

Torbjorn Granlund tege at swox.com
Fri Oct 7 17:52:03 CEST 2005


Matthew Mundell <mattm at comp.leeds.ac.uk> writes:

  Torbjorn Granlund <tege at swox.com> writes:
  
  > Matthew Mundell <mattm at comp.leeds.ac.uk> writes:
  >
  >   In the Parma Polyhedron Library, using GMP 4.1.4, calls to
  >   mpz_ui_pow_ui with large exponents are resulting in segmentation
  >   faults.
  >
  > I suspect this is Q3 from http://swox.com/gmp/#FAQ.
  > Can you please confirm?
  
  Yes, it is, thank you.
  
  -*- mode: compilation; default-directory: "~/src/tests/c/" -*-
  ulimit -s 8388608 && gmp-pow
  10^12345678
  10^123456789
  
It is a misfeature of all current GMP releases that they allocate
arbitrary amonts of memory from the stack.  This behaviour will
change in the next major GMP release.

-- 
Torbjörn


More information about the gmp-bugs mailing list