[Patch] Bug fix for jump optimisations under debug mode
Original Reporter info from Mantis: CuriousKit @CuriousKit
-
Reporter name: J. Gareth Moreton
Original Reporter info from Mantis: CuriousKit @CuriousKit
- Reporter name: J. Gareth Moreton
Description:
When building packages with DEBUG=1, some of the files can sometimes raise internal error 2018062911 under x86_64-linux. This was due to the presence of a "tai_tempalloc" entry that the code wasn't expecting in OptPass2Jcc.
Now, for both OptPass2Jcc and SkipLabelFast, if any entries are found that belong to the SkipInstr set (which includes tai_tempalloc), the stripping code will move to the next entry and leave it alone. The internal error is still raised though if it isn't a label or align and doesn't belong to the set (i.e. is an instruction or something else that affects program flow in some way).
Steps to reproduce:
Apply patch, then run the following command from an x86_64 Linux terminal (specifying directories and prefixes if needs be):
"make distclean all install DEBUG=1 NOGDB=1 NOGDBMI=1 GDBMI=1"
Confirm that Internal Error 2018062911 is no longer raised when packages are compiled.
Additional information:
Additionally, SkipLabelFast now has a check that will not remove alignment fields if debug info is present, so such behaviour is consistent throughout the compiler.
Mantis conversion info:
- Mantis ID: 36299
- OS: Ubuntu
- OS Build: 16.04
- Build: r43453
- Platform: x86_64-linux
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 43455 (#5c0a5b73)