Bug 213008 - [clang] Bad machine code: Using an undefined physical register
Summary: [clang] Bad machine code: Using an undefined physical register
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-26 17:56 UTC by Thierry Thomas
Modified: 2020-05-04 08:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2016-09-26 17:56:11 UTC
The port cad/gmsh-occ failed on the packages cluster with the following message:

*** Bad machine code: Using an undefined physical register ***
- function:    _ZN11voroMetal3D14correspondanceEddddiRbddd
- basic block: BB#22 land.lhs.true34 (0x2ee848bc)
- instruction: FNSTSW16r
- operand 1:   %FPSW<imp-use,kill>
fatal error: error in backend: Found 1 machine code errors.
c++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
Target: i386-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
c++: note: diagnostic msg: 

Full log is available at
http://beefy3.nyi.freebsd.org/data/head-i386-default/p422738_s306306/logs/gmsh-occ-2.12.0_1.log
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2016-09-26 21:48:02 UTC
Yeah, this is clearly the infamous http://llvm.org/PR21903 striking again. There is a bug in llvm's processing of x87 status words, which is very old by now, and apparently very difficult to fix.

You might be able to work around it by lowering the optimization level, selecting another CPU type, or otherwise just mark the port BROKEN for i386 for now.  I do not expect this bug to get solved any time soon.
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2016-09-27 20:50:50 UTC
Thanks for your comment: I marked the port BROKEN until next version.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:50:29 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.