memory problem with GMP 5

Torbjorn Granlund tg at gmplib.org
Mon Jan 25 22:42:04 CET 2010


Paul Zimmermann <Paul.Zimmermann at loria.fr> writes:

  > This is invalid usage of mpn_mul; the first operand must not have fewer
  > limbs than the second operand.  (This is not enforced unless you compile
  > with --enable-alloca, and sometimes you might end up with the correct
  > product.  But such usage is defined to give undefined results and might
  > as you noticed use excessive amounts of memory.
  
  sorry for that.
  
  > If you see excessive allocation also for correcrt usage of mpn_mul,
  > please let us know.
  
  I confirm I get identical results with the correct operand order:
  
Sorry for that.  :-)

Marco is working on this, and might actually have a solution.  (I'll work
less with GMP for a while, due to teaching duties.)

-- 
Torbjörn


More information about the gmp-bugs mailing list