Closed Bug 431950 Opened 13 years ago Closed 11 years ago

disable scary-but-harmless zlib trace warnings in debug builds

Categories

(Core :: ImageLib, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: Dolske, Assigned: Dolske)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch v.1 (obsolete) — Splinter Review
While using a debug build, you'll see occasional console messages like:

bit length overflow
code 4 bits 6->7

These are a side effect of bug 389273... We reencode favicons as PNGs, the PNG encoder uses zlib, and zlib barfs up messages like this now and then. The messages are harmless, but can be a bit confusing to people watching the console while testing their own changes.

This patch disables DEBUG mode in zlib unless ZLIB_DEBUG is also defined. zlib is extremely stable, so there's not much value in having it's DEBUG mode just because Mozilla might be in DEBUG too.
Flags: in-testsuite-
Attachment #319096 - Flags: superreview?(pavlov)
Attachment #319096 - Flags: review?(pavlov)
Comment on attachment 319096 [details] [diff] [review]
Patch v.1

are there other mozilla ifdefs in this code?  i'd really rather not change zlib if we can avoid it.
Yeah, there seem to be some other mozilla-specific changes to zlib since it was upgraded to 1.2.3 long ago (a #include of mozzconfig.h, something for OS/2, something for VC9). So the "have to merge Mozilla changes with Zlib changes" threshold has already been crossed...
Duplicate of this bug: 448733
Attachment #319096 - Flags: superreview?(pavlov)
Attachment #319096 - Flags: review?(pavlov)
Attachment #319096 - Flags: review+
Comment on attachment 319096 [details] [diff] [review]
Patch v.1

I don't believe this needs sr under the current rules.

Can you add this (and any other undocumented moz changes, like the OS/2 and VC9 stuff you mentioned) to Changelog.moz? r=bholley with that change.
Attached patch Patch v.2Splinter Review
Updated patch, added note to ChangeLog.moz.
Assignee: nobody → dolske
Attachment #319096 - Attachment is obsolete: true
Pushed http://hg.mozilla.org/mozilla-central/rev/7c3025d9dc5f
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.9 → mozilla1.9.3a1
dolske: I solved this problem in NSS's zlib by compiling
it with -Dverbose=-1:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss/lib/zlib/manifest.mn&rev=1.9&mark=64-66#64

Although the 'verbose' macro seems undocumented, I believe
defining 'verbose' as a negative number is the proper way
to turn off zlib's "Trace" macro in DEBUG build.  See
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss/lib/zlib/zutil.c&rev=1.6&mark=115,117-120#115

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss/lib/zlib/zutil.h&rev=1.8&mark=239,244#238
You need to log in before you can comment on or make changes to this bug.