| Summary: | object-only code uses string after it has been freed | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Developer Toolset | Reporter: | Nick Clifton <nickc> | ||||
| Component: | binutils | Assignee: | Nick Clifton <nickc> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Martin Cermak <mcermak> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | DTS 4.1 RHEL 7 | CC: | kanderso, law, mcermak, mnewsome, mpolacek, ohudlick | ||||
| Target Milestone: | beta1 | ||||||
| Target Release: | 4.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1323760 (view as bug list) | Environment: | |||||
| Last Closed: | 2016-04-06 09:37:54 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1323760 | ||||||
| Attachments: |
|
||||||
This BZ has already been fixed by another commit. |
Created attachment 1143380 [details] Proposed patch Description of problem: The function ld/ldlang.c:cmdline_add_object_only_section() assigns the variable ofilename to the result of bfd_get_filename(), but it does not copy the result. Thus once bfd_close has been called on the file, ofilename no longer points to valid memory. But, it is still used by cmdline_add_object_only_section as an argument to rename(). Version-Release number of selected component (if applicable): n/a. How reproducible: Run linker testsuite. Note failures of LTO 5 and LTO 3 tests. Additional info: