Date: Fri, 19 Jul 2024 15:53:21 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 280371] diff(1) attempts to allocate ~10^20 bytes while comparing 32GB text files Message-ID: <bug-280371-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280371 Bug ID: 280371 Summary: diff(1) attempts to allocate ~10^20 bytes while comparing 32GB text files Product: Base System Version: 14.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: yuri@freebsd.org I tried to compare 2 large files: > $ diff broadinstitute-gatk-4.6.0.0_GH0.tar.good.hex broadinstitute-gatk-= 4.6.0.0_GH0.tar.bad.hex | more > diff: xreallocarray: allocating 18446744073509292634 * 12 bytes: Cannot a= llocate memory File sizes: > $ ls -l broadinstitute-gatk-4.6.0.0_GH0.tar.good.hex broadinstitute-gatk-= 4.6.0.0_GH0.tar.bad.hex > -rw-r--r-- 1 yuri users 32676484755 Jul 18 21:07 broadinstitute-gatk-4.6= .0.0_GH0.tar.bad.hex > -rw-r--r-- 1 yuri users 32676397537 Jul 18 20:06 broadinstitute-gatk-4.6= .0.0_GH0.tar.good.hex These files have some differences in the middle. The failure is most likely due to an overflow. diff(1) should be able to compare 32GB files without the need to allocate m= uch more memory than file sizes. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280371-227>