as segfault with invalid -march= option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Low
|
Canonical Foundations Team | ||
binutils (Ubuntu) |
Fix Released
|
Undecided
|
Skipper Bug Screeners | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* as segfaults, instead of exiting gracefully, when one specifies unsupported arch option (ie. one from future - cause xenial did not support z14)
* this is bad, as detection fails around supported march options - as if binutils are completely broken, rather than just not supporting this or that CPU level of optimisations.
[Test Case]
Bad result:
$ as -march=foo
Segmentation fault
Expected result:
# as -march=foo
Assembler messages:
Error: invalid switch -march=foo
Error: unrecognized option -march=foo
[Regression Potential]
* The result is still a failure condition, but with a proper exit code and standard error messages, rather than an unexplainable generic segfault.
[Other Info]
* Original bug report
The GNU assembler segfaults with an invalid -march= option
Contact Information = n/a
---uname output---
n/a
Machine Type = n/a
---Debugger---
A debugger is not configured
---Steps to Reproduce---
$ as -march=foo
Segmentation fault
Expected result:
# as -march=foo
Assembler messages:
Error: invalid switch -march=foo
Error: unrecognized option -march=foo
Userspace tool common name: as
The userspace tool has the following bit modes: 64
Userspace rpm: binutils-
Userspace tool obtained from project website: na
*Additional Instructions for n/a:
-Attach ltrace and strace of userspace application.
The problem is not critical since usually 'as' is invoked through the gcc driver which itself errors out for wrong -march= options. It will only be a problem if somebody builds a more recent GCC from source and uses an -march= option for a machine not supported by the default binutils.
Please consider integrating the attached patch into 16.04 binutils.
The problem has been fixed in later binutils already. Ubuntu 18.04 does not appear to be affected.
--> Package has to set corectly by Canonical
affects: | linux (Ubuntu) → binutils (Ubuntu) |
Changed in ubuntu-z-systems: | |
status: | New → Triaged |
importance: | Undecided → Low |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Changed in ubuntu-z-systems: | |
status: | Triaged → In Progress |
description: | updated |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
Default Comment by Bridge