[Git][reproducible-builds/diffoscope][master] Support radare2 >= 5.9.0. (Closes: reproducible-builds/diffoscope#432)

Chris Lamb (@lamby) gitlab at salsa.debian.org
Wed Sep 23 23:01:15 UTC 2026



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
ba64aec7 by Chris Lamb at 2026-09-23T16:00:58-07:00
Support radare2 >= 5.9.0. (Closes: reproducible-builds/diffoscope#432)

The tests are not currently being run on Debian, so no immediate need
to add a >= 5.9.0 version gate to the tests; they presumably have been
"broken" on Debian for some time.

- - - - -


2 changed files:

- diffoscope/comparators/decompile.py
- tests/data/elf_obj_radare2_expected_diff


Changes:

=====================================
diffoscope/comparators/decompile.py
=====================================
@@ -242,7 +242,11 @@ class AsmFunction(File):
 
     @property
     def offset(self):
-        return self.data_dict["offset"]
+        try:
+            return self.data_dict["addr"]
+        except KeyError:
+            # Be backwards compatible with version < 5.9.0
+            return self.data_dict["offset"]
 
     @property
     def size(self):


=====================================
tests/data/elf_obj_radare2_expected_diff
=====================================
@@ -1,13 +1,10 @@
-@@ -1,11 +1,11 @@
- 
- // This function contains 1 basic blocks and its 11 long.
- function sym.f () {
-     loc_0x8000040:
-     push rbp      //[01] -r-x section size 11 named .text
-     rbp = rsp
--    eax = 0x2a    //'*' ; 42
-+    eax = 0xffffffff //-1
-     //rsp ; rsp
-     return
-     (break)
+@@ -1,9 +1,9 @@
+ // callconv: rax amd64 (rdi, rsi, rdx, rcx, r8, r9, xmm0, xmm1, xmm2, xmm3, xmm4);
+ void sym.f (void) {
+         push (rbp)    // [01] -r-x section size 11 named .text
+         rbp = rsp
+-        eax = 0x2a    // '*' // 42
++        eax = 0xffffffff // -1
+         rbp = pop ()  // rsp // rsp
+         return
  }



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/ba64aec70232a76c7e668a5e679cc7daef2281c2

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/ba64aec70232a76c7e668a5e679cc7daef2281c2
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20260923/5bf70d01/attachment.htm>


More information about the rb-commits mailing list