LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-12-2022, 01:19 AM   #1
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
zlib crc32 problems


Hello All,
I wanted to drop some information about this. AS far as I know, this does not affect a lot of applications but there are several bug reports in zlib issues page. The basic explanation is that the behaviour of crc32 changed between 1.2.11 and 1.2.12 which broke calculations. (OK actually it works more strict.) Because of the affect, they bought back the old behaviour back. Details about what they did is in this commit.
From the comments I read, they plan to do a new release soon.

Regards,
Ozan
 
Old 04-12-2022, 06:33 AM   #2
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by ozanbaba View Post
Hello All,
I wanted to drop some information about this. AS far as I know, this does not affect a lot of applications but there are several bug reports in zlib issues page. The basic explanation is that the behaviour of crc32 changed between 1.2.11 and 1.2.12 which broke calculations. (OK actually it works more strict.) Because of the affect, they bought back the old behaviour back. Details about what they did is in this commit.
From the comments I read, they plan to do a new release soon.

Regards,
Ozan
Strange problem, isn’t it? I have trouble wrapping my head around the idea that an application may pass garbage into some part of a value (and that part doesn’t even have any meaning to the called function), and won’t run into problems later on when who knows what garbage it has dumped there at that time. But then, I don’t really know what I’m talking about here, anyway. (If I did, then I guess I would understand why such garbage won’t hurt in this specific case. )
 
Old 04-20-2022, 01:55 PM   #3
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by ozanbaba View Post
Hello All,
I wanted to drop some information about this. AS far as I know, this does not affect a lot of applications but there are several bug reports in zlib issues page. The basic explanation is that the behaviour of crc32 changed between 1.2.11 and 1.2.12 which broke calculations. (OK actually it works more strict.) Because of the affect, they bought back the old behaviour back. Details about what they did is in this commit.
From the comments I read, they plan to do a new release soon.

Regards,
Ozan
I can confirm that, with the patch, zlib works correctly again—at least when it comes to building the openjdk7 SlackBuild. I had kept the failing SlackBuild around and, after I rebuilt zlib with the patch included, I retried the “jar” command that failed. In actual fact, the failing command was a jar “update”, so I first ran the preceding jar “create”:
Code:
/tmp/SBo/openjdk7/icedtea-build/bootstrap/jdk1.6.0/bin/jar \
   cf \
   /tmp/SBo/openjdk7/icedtea-build/openjdk.build/hotspot/outputdir/linux_amd64_compiler2/product/../generated/sa-jdi.jar \
   -C /tmp/SBo/openjdk7/icedtea-build/openjdk.build/hotspot/outputdir/linux_amd64_compiler2/product/../generated/saclasses/ \
   .
Then came the jar “update”:
Code:
/tmp/SBo/openjdk7/icedtea-build/bootstrap/jdk1.6.0/bin/jar \
   uf \
   /tmp/SBo/openjdk7/icedtea-build/openjdk.build/hotspot/outputdir/linux_amd64_compiler2/product/../generated/sa-jdi.jar \
   -C \
   /tmp/SBo/openjdk7/icedtea-build/openjdk/hotspot/agent/src/share/classes META-INF/services/com.sun.jdi.connect.Connector
Without the patch, a Java “ZipException” is the result:
Code:
java.util.zip.ZipException: invalid entry CRC (expected 0x3943b2a7 but got 0xc7a06d31)
	at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:413)
	at java.util.zip.ZipInputStream.read(ZipInputStream.java:195)
	at java.io.FilterInputStream.read(FilterInputStream.java:107)
	at sun.tools.jar.Main.copy(Main.java:822)
	at sun.tools.jar.Main.update(Main.java:584)
	at sun.tools.jar.Main.run(Main.java:224)
	at sun.tools.jar.Main.main(Main.java:1231)
With the patch, the jar file gets correctly generated.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] building libpng-1.6.37 fails with call to zlib, but zlib is installed cpeognsoelds Linux - Software 3 03-01-2022 08:39 PM
How do I generate a crc32 checksum? docbrazen Linux - Newbie 9 10-24-2012 03:52 PM
no matching comp found: client zlib none, zlib@openssh.com lost connection jorge_ivan Linux - Networking 0 08-14-2006 07:09 PM
asm crc32 routine gecoool Programming 4 01-31-2006 08:46 AM
Can't active Library routines CRC32 in fedora 4 smashhead Linux - Wireless Networking 0 08-07-2005 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration