Closed Bug 431950 Opened 15 years ago Closed 13 years ago

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


(Core :: Graphics: ImageLib, defect)

Not set





(Reporter: Dolske, Assigned: Dolske)




(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...
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
Closed: 13 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:

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,117-120#115,244#238
You need to log in before you can comment on or make changes to this bug.