6.0.0 crash at high precision mul?

Torbjörn Granlund tg at gmplib.org
Fri Jun 6 12:01:47 UTC 2014


bodrato at mail.dm.unipi.it writes:

  https://gmplib.org/list-archives/gmp-devel/2012-February/002212.html
  
  I keep on thinking it's not a bad idea...
  
We never brought up the aspect of total allocation size back then.
I'd suggest using something like

if (total_size > 65536)
  xp = TMP_BALLOC (...);
  yp = TMP_BALLOC (...);
  zp = TMP_BALLOC (...);
else
  xp = TMP_SALLOC (...);
  yp = TMP_SALLOC (...);
  zp = TMP_SALLOC (...);
  
in relevant places.

  But we this thread was started because of a crash occurring at symbol
  __gmpn_toom8h_mul ... toom8 does not allocate temporaries, and mul should
  allocate it all at once...
  
But then the crash will happen when unmapped stack is actually used.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-discuss mailing list