Bug 2219 - libtiff has many globals
: libtiff has many globals
Status: RESOLVED LATER
: libtiff
default
: unspecified
: PC Linux
: P2 enhancement
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2010-06-22 15:46 by
Modified: 2019-10-01 14:19 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-06-22 15:46:56
libtiff has many globals. These fit into 3 or 4 categories. This bug should be
set up to depend on other bugs for the individual issues.

Here is a current dump of the globals in libtiff on Linux:

$ nm libtiff.so.5.0.3 -S --size-sort | grep ' [dDbB] '
000000000026f660 0000000000000001 b completed.6338
000000000026f850 0000000000000004 b Fltsize
000000000026f854 0000000000000004 b LogK1
000000000026f858 0000000000000004 b LogK2
000000000026f6a0 0000000000000004 b initialized.6408
000000000026f648 0000000000000008 D _TIFFerrorHandler
000000000026f688 0000000000000008 B _TIFFerrorHandlerExt
000000000026f680 0000000000000008 b _TIFFextender
000000000026f640 0000000000000008 D _TIFFwarningHandler
000000000026f860 0000000000000008 B _TIFFwarningHandlerExt
000000000026f668 0000000000000008 b dtor_idx.6340
000000000026f678 0000000000000008 b registeredCODECS
000000000026f670 0000000000000008 b whitepoint.5360
000000000026cfc0 000000000000000c d ycbcrcoeffs.5356
000000000026d1a0 0000000000000018 d exifFieldArray
000000000026d1c0 0000000000000018 d tiffFieldArray
000000000026c2c0 0000000000000030 d fax3Fields
000000000026c280 0000000000000030 d fax4Fields
000000000026c5e0 0000000000000030 d predictFields
000000000026c6e0 0000000000000030 d zipFields
000000000026c680 0000000000000048 d orientNames
000000000026c620 0000000000000048 d photoNames
000000000026c3c0 0000000000000060 d LogLuvFields
000000000026c580 0000000000000060 d pixarlogFields
000000000026c300 00000000000000c0 d jpegFields
000000000026c180 00000000000000f0 d faxFields
000000000026c420 0000000000000150 d ojpegFields
000000000026f6c0 0000000000000190 b oog_table.6407
000000000026cfe0 00000000000001b0 D _TIFFBuiltinCODECS
000000000026d1e0 0000000000000a80 d exifFields
000000000026dc60 00000000000019e0 d tiffFields

The worst ones are the codecs, warning, error, and extender. To fix this
without breaking compatibility with existing source, these need to be fixed in
the manner specified here: http://www.asmail.be/msg0054681986.html

Next come a few tables that should be generated at compile time (Fltsize,
LogK1, LogK2, initialized, oog_table).

There are a few static things that are returned by TIFFGetField, I think
whitepoint and ycbcrcoeffs. These definitely need to be fixed.

photoNames and orientNames could be changed from char* arrays to switch
statements, this would save a few more relocations.

The Fields things are ok, they are static const in the code, but due to shared
library relocations cannot be const in the library.
------- Comment #1 From 2019-10-01 14:19:34 -------
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets,
such as this one, have been migrated to the libtiff GitLab instance at
https://gitlab.com/libtiff/libtiff/issues .

The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is
the initial Bugzilla issue number.