FS#47284 - [gmp] Illegal Instruction for Pentium Skylake

Attached to Project: Arch Linux
Opened by Paul (endoplasmicreticulum) - Sunday, 06 December 2015, 19:14 GMT
Last edited by Allan McRae (Allan) - Thursday, 30 June 2016, 05:18 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
The gmp library contains a faulty instruction (mulx) which does not exist on Pentium G4400 although it's a skylake one.
So the result is a non working gmp library which affects other programs as well like gcc because they all rely on gmp.
I talked to one of the developer and he said that it has to be fixed from the package maintainer side as he also have release a patch which should fix this.
(The Pentium G4400 has a known cpuid bug which returned wrong feature flags -> BMI1 & BMI2; The patch should properly detect this for the host computer)

Additional info:
* gmp 6.1.0-1
* There is a patched config.guess for correctly detecting cpu features (disappearance of BMI1 & BMI2)

https://gmplib.org/repo/gmp/rev/a0d7048910a7

Steps to reproduce:
-> Have a Intel Pentium G4400
-> Try to run: "expr 4 \* 4"
-> Expect a crash (Illegal Instruction mulx)
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 30 June 2016, 05:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  gmp-6.1.1-1
Comment by Paul (endoplasmicreticulum) - Sunday, 06 December 2015, 19:18 GMT Comment by Paul (endoplasmicreticulum) - Sunday, 13 December 2015, 15:09 GMT
I figured out a patch for this. I basically copied the patch which one developer applied to the config.guess file and I simply took that and applied it to the fat.c file for the arch detection logic.
It should work with --enable-fat.

Comment by Allan McRae (Allan) - Tuesday, 15 December 2015, 01:28 GMT
Can you ask that upstream also add your second patch. For now I am going to disable fat builds for the time being..
Comment by Paul (endoplasmicreticulum) - Tuesday, 15 December 2015, 19:20 GMT
  • Field changed: Percent Complete (100% → 0%)
Update:
The issues have been fixed some days ago.
See these commits:
https://gmplib.org/repo/gmp/rev/bbb7dd6b920e
Comment by Kevin Dodd (Jesin) - Sunday, 05 June 2016, 20:06 GMT
Does this mean that fat builds can be re-enabled?

Loading...