Bug 217115 - bsdiff stops with SIGBUS in some cases
Summary: bsdiff stops with SIGBUS in some cases
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2017-02-15 15:17 UTC by Armin Pirkovitsch
Modified: 2017-10-29 15:33 UTC (History)
3 users (show)

See Also:


Attachments
files that cause the problem (80.75 KB, application/gzip)
2017-02-15 15:17 UTC, Armin Pirkovitsch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Pirkovitsch freebsd_committer 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 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 2017-10-26 09:10:13 UTC
Just tested it on 11.1 Release - same problem - 11.0 works fine.