Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • diffoscope diffoscope
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 145
    • Issues 145
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Reproducible BuildsReproducible Builds
  • diffoscopediffoscope
  • Issues
  • #188
Closed
Open
Issue created Jul 01, 2020 by Phil Connell@phconnel

Crash on hardlink in an ISO

If an ISO contains a hardlink, diffoscope crashes in list_libarchive when processing the hardlink as entry.size is None and so the {size_or_dev:>8} formatting fails:

  File "/srv/diffoscope/diffoscope/comparators/utils/libarchive.py", line 164, in list_libarchive
    yield "{strmode} {entry.nlink:>3} {user:>8} {group:>8} {size_or_dev:>8} {mtime:>8} {name_and_link}\n".format(
TypeError: unsupported format string passed to NoneType.__format__

It looks like this is expected behaviour in libarchive. It's also easily reproducible:

mkdir diffoscope-crasher
cd diffoscope-crasher
echo "hello" > foo
ln foo bar
mkisofs -R -uid 0 -gid 0 -input-charset utf-8 -v -o ../crasher1.iso .
echo "bye" >> foo
mkisofs -R -uid 0 -gid 0 -input-charset utf-8 -v -o ../crasher2.iso .
cd ..
docker run --rm -it -w $(pwd) -v $(pwd):$(pwd):rw registry.salsa.debian.org/reproducible-builds/diffoscope crasher{1,2}.iso

It seems fairly clear that list_libarchive ought to account for hardlinks, though it's not obvious to me exactly how the rest of diffoscope would like to consume that information!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking