Crashes after upgrading to GMP 6.20+

Torbjörn Granlund tg at gmplib.org
Tue Apr 27 08:19:23 UTC 2021


Michael Maroszek <paresy at gmail.com> writes:

  i am using an unpatched gmplib version and the problem was introduced with
  version 6.20 (still exists in 6.21). Reverting to 6.1.2 solves the problem.

There are no GMP versions 6.20 or 6.21.  Are these PHP releases, perhaps?

  The problem does not happen on all systems. Only a few users are affected,
  which use a specific NAS (and therefore CPU). Our app is running inside a
  docker container and there seems to be at least one related bug report on
  GitHub: https://github.com/home-assistant/core/issues/44538

  The affected CPU is: Intel Celeron J3455

A CPU model GMP knows of.  GMP matches it as goldmont.

  Unfortunately i don't have a full example app yet. It happens when using
  the GMP functions in PHP. If definitely required I would do the work and
  create a plain c app, but as far as i have seen the crash directly happens
  when using the gmp functions. (The crash always happens - it seems like the
  "fat" code doesn't detect the target system properly and uses an invalid
  optimization)

These are guesses.  I strongly suggest that you debug it.

Also, "crash" is is unnecessarily vague.

  #0    Object "/usr/bin/foo", at 0x55e4ff7368d9, in __gmpz_set_str

  2021-04-01T12:29:38.2070642Z checking build system type...
  broadwell-pc-linux-gnu

If it is matched as broadwell-pc-linux-gnu, somebody is lying.  That's
hardly what the cpuid instruction on a J3455 returns.

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


More information about the gmp-bugs mailing list