Bug 217115

Summary: bsdiff stops with SIGBUS in some cases
Product: Base System Reporter: Armin Pirkovitsch <sperber>
Component: binAssignee: Bugmeister <bugmeister>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: allanjude, bapt, cperciva, fnoyanisi
Priority: --- Keywords: regression
Version: 11.1-RELEASE   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
files that cause the problem none

Description Armin Pirkovitsch freebsd_committer freebsd_triage 2017-02-15 15:17:33 UTC
Created attachment 180017 [details]
files that cause the problem

On more recent CURRENT (as far as I can tell at least this year) bsdiff stops with SIGBUS when comparing the attached files by running
> bsdiff d76057a1a25b15b72ca9961d630b295316894d4ac679e54cd471b85eadf694ea acpi_hp.ko.debug outfile

running
> bsdiff acpi_hp.ko.debug d76057a1a25b15b72ca9961d630b295316894d4ac679e54cd471b85eadf694ea outbl
works fine.

The problem can be reproduced with r313726 and r313041 and can't be reproduced on freefall (r309137).

idwer on #bsdcode was able to reproduce the problem and provided a truss log: http://dpaste.com/2JB0GG2
Comment 1 Allan Jude freebsd_committer freebsd_triage 2017-02-15 15:52:54 UTC
The issue is caused when trying to read an invalid pointer in matchlen()

I am still tracking down why the 'oldsize' is -6510615555427011531
Comment 2 Armin Pirkovitsch freebsd_committer freebsd_triage 2017-10-26 09:10:13 UTC
Just tested it on 11.1 Release - same problem - 11.0 works fine.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2023-12-31 02:22:37 UTC
^Triage: close as OBE.

I'm sorry that this PR never got looked at, but by now, 11.X is long out of support.