Bug#1068705: diffoscope crashes on libscout 2.3.2-3 build on unstable but not bullseye

Fay Stegerman flx at obfusk.net
Thu Apr 11 04:08:14 BST 2024


* Fay Stegerman <flx at obfusk.net> [2024-04-11 04:28]:
> * Holger Levsen <holger at layer-acht.org> [2024-04-11 02:14]:
> > > unzip does seem to extract all the files, though it errors out.  Not sure what
> > > diffoscope should do here.  This is definitely a broken ZIP file.  That bug
> > > should probably be reported against libscout or whatever tooling it used to
> > > create that JAR.
> > 
> > I agree it's more complicated, but fundamentally, diffoscope should *not* crash
> > here! (but rather report the broken zip file.)
> 
> I think we all agree it shouldn't crash :)
> 
> What I meant is that I'm not sure it should simply catch the error, report the
> file as broken, and not attempt extraction, or if it makes sense to attempt to
> work around this issue, at least in cases like this specific one where the
> entries are exact duplicates and the files can presumably be safely extracted.
> I think my workaround (which could be implemented slightly differently as well,
> without modifying the ZipFile, but processing it differently in diffoscope)
> would accomplish that for this JAR at least.  I could make an MR for that.
> Though as I said I will also report this upstream to cpython, probably tomorrow.
> 
> - Fay

The attached patch avoids the crash in this case, FWIW.  I would still recommend
catching the error for other cases.

- Fay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dup-zip-entries.patch
Type: text/x-diff
Size: 1095 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20240411/540818bb/attachment.patch>


More information about the Reproducible-builds mailing list