Project

General

Profile

Actions

Bug #13878

open

ctfdiff of functions thinks they always change

Added by Rich Lowe almost 2 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

; ctfdiff amd64/libzpool.so.1 amd64/libzpool.so.1 | head
ctf container amd64/libzpool.so.1 function raidz_rec_q_coeff (1394) is different
ctf container amd64/libzpool.so.1 function raidz_rec_r_coeff (1395) is different
ctf container amd64/libzpool.so.1 function raidz_rec_pq_coeff (1396) is different
ctf container amd64/libzpool.so.1 function raidz_rec_pr_coeff (1397) is different
ctf container amd64/libzpool.so.1 function raidz_rec_qr_coeff (1398) is different
ctf container amd64/libzpool.so.1 function raidz_rec_pqr_coeff (1399) is different
ctf container amd64/libzpool.so.1 function raidz_zero_abd_cb (1400) is different
ctf container amd64/libzpool.so.1 function raidz_copy_abd_cb (1401) is different
ctf container amd64/libzpool.so.1 function raidz_add_abd_cb (1402) is different
ctf container amd64/libzpool.so.1 function raidz_mul_abd_cb (1403) is different
Actions #1

Updated by Rich Lowe almost 2 years ago

in another instance of this bug, comparing the unix binary with itself, the problem is that we have multiple functions which match precisely, let's say their IDs are 8 and 30.

When building up our mapping we work in two nested loops in ID order and stop for each when we find a match.

This means in our example we match 8 with 8, and then 30 with 8, leaving 30 in the second object hanging.

Removing the break from this loop fixes the problem, as we then walk all of the second file, but it's not obvious to me this wouldn't cause other issues.

Actions #2

Updated by Rich Lowe almost 2 years ago

https://github.com/illumos/illumos-gate/blob/247ccfcd15f7f6b949ea71990372f0f9a93058d2/usr/src/lib/libctf/common/ctf_diff.c#L1157

Is the break referred to in the above comment. The issue seems like it probably also exists for objects

Actions

Also available in: Atom PDF