|
Bugzilla – Full Text Bug Listing |
| Summary: | debugedit: Couldn't update relocation: invalid data (KMP build failure) | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Stefan Dirsch <sndirsch> |
| Component: | Other | Assignee: | Richard Biener <rguenther> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | Larry.Finger, mls, suse+build |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Stefan Dirsch
2018-01-19 13:58:35 UTC
This was still working on 2018-01-08 in our internal buildservice. I think mls simply dropped some required fixes for debugediting the dwarf line tables (debugedit-canon-fix.diff, the edit_dwarf2_line hunks). The relevant function seems to have been rewritten completely with as much (no) documentation as before ... :/ I'll see on monday to confirm this and "forward port" the fix I did last year. I will not try to supply a test case as the VirtualBox build takes about 45 minutes on an i7 with SSD to reach the failure point. Thanks for checking this problem. So the specific bug I was pointing out is avoided by the rewrite. They still seem to copy "garbage" at the end of the file table though. I'll see to debug this some more. (gdb) p r_offset
$8 = 4294971687
(gdb) p dso->lines.table[lndx]
$37 = {old_idx = 0, new_idx = 0, size_diff = -12, replace_dirs = true,
replace_files = false, unit_length = 4759, version = 2,
header_length = 4390, min_instr_len = 1 '\001',
max_op_per_instr = 186 '\272', default_is_stmt = 1 '\001',
line_base = -5 '\373', line_range = 14 '\016', opcode_base = 13 '\r'}
size_diff is -12 but as the expression is computed unsigned we end up with
r_offset zero-extended as r_offset is unsinged long long but the difference
we compute is unsigned int (in the 32bit debugedit case).
Thus a debugedit issue.
Fix:
--- tools/debugedit.c.orig 2018-01-22 12:09:07.477955907 +0100
+++ tools/debugedit.c 2018-01-22 12:09:22.210197759 +0100
@@ -2154,9 +2154,9 @@
/* Offset (pointing into the line program) moves
from old to new index including the header
size diff. */
- r_offset += ((dso->lines.table[lndx].new_idx
- - dso->lines.table[lndx].old_idx)
- + dso->lines.table[lndx].size_diff);
+ r_offset += (ssize_t)((dso->lines.table[lndx].new_idx
+ - dso->lines.table[lndx].old_idx)
+ + dso->lines.table[lndx].size_diff);
if (rtype == SHT_RELA)
{
will commit to Base:System and SR to Factory.
SR#568109 mls, please forward upstream. This is an autogenerated message for OBS integration: This bug (1076819) was mentioned in https://build.opensuse.org/request/show/568109 Factory / rpm Thanks for debugging and fixing this! This is an autogenerated message for OBS integration: This bug (1076819) was mentioned in https://build.opensuse.org/request/show/568126 Factory / rpm *** Bug 1076650 has been marked as a duplicate of this bug. *** Fix is meanwhile in TW/Factory. Closing as such. (In reply to Richard Biener from comment #11) > *** Bug 1076650 has been marked as a duplicate of this bug. *** I reopened #1076650, since the issue mentioned in that bug is not fixed by https://build.opensuse.org/request/show/568126 |