Bug 689333 - Embed C strings and not an array of character values, as the HP-UX
Summary: Embed C strings and not an array of character values, as the HP-UX
Status: NOTIFIED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks: 689315
  Show dependency treegraph
 
Reported: 2007-07-04 10:05 UTC by Till Kamppeter
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Fix array size limit problem under HP UX. (2.21 KB, patch)
2007-07-04 10:06 UTC, Till Kamppeter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Till Kamppeter 2007-07-04 10:05:42 UTC
The attached patch from ESP GS embeds C strings and not an array of character
values in src/geninit.c, as the HP-UX C compiler can't handle such a large array
without running out of memory.

Note that the Microsoft compilers limit the length of C strings and do not limit
array sizes. So for correctly fixing this bug there must be both ways
implemented in the source code, but with conditionals which depend on the
compiler used.
Comment 1 Till Kamppeter 2007-07-04 10:06:46 UTC
Created attachment 3159 [details]
Fix array size limit problem under HP UX.
Comment 2 Ray Johnston 2007-07-04 10:48:31 UTC
While this patch won't hurt, it doesn't change anything since it affects only
deprecated use of geninit.

Note that the 'C' emitter of geninit.c is no longer used by COMPILE_INITS=1.

Instead it is only used to make the merged/stripped gsinit.ps which is used
as (one of) the input files for mkromfs.

The data for mkromfs is put into 'nodes', with the (compressed) data written
as 32-bit hex initializers. Very large files in the %rom% device may require
us to restructure things to allow one initializer per compressed block.

Please test COMPILE_INITS=1 on the HP-UX C compiler and look at the log
file where obj/gsromfs.c is compiled to see if warnings or errors are generated.


Comment 3 Ray Johnston 2007-07-10 10:10:18 UTC
Assigning back to submitter for re-testing. 
Comment 4 Till Kamppeter 2007-07-10 10:44:14 UTC
Unfortunately, I cannot do any testing here, as I have neither an HP UX nor a
Windows box.

So if the patch only affects obsolete code, simply close the bug.
Comment 5 Alex Cherepanov 2007-08-26 13:31:40 UTC
I confirm that aC++ compiler on HP-UX B.11.31 U 9000/800 has no
problem compiling %romfs device.

There are many other issues detected by aC++ compiler but they are unrelated to
this problem and will be tracked separately.