harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cornwall (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect
Date Thu, 04 Sep 2008 17:45:44 GMT
[pack200][classlib] SegmentHeader.archiveModtime is incorrect
-------------------------------------------------------------

                 Key: HARMONY-5970
                 URL: https://issues.apache.org/jira/browse/HARMONY-5970
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M7
         Environment: All Pack200 M7
            Reporter: Andrew Cornwall
             Fix For: 5.0M7
         Attachments: hello.jar, hello.pack.gz

The value for archive_modtime in SegmentHeader appears to be calculated incorrectly. Because
of this, the dates in the JAR file are all 1980-01-01 rather than the correct dates.

(This isn't a case of the date being thrown out because of pack -E9. Sun's unpack200.exe preserves
the dates.)

I've attached a testcase, hello.pack.gz. If you unpack it with Sun's unpack200, you'll see:

Archive:  sun.jar
PACK200
 Length   Method    Size  Ratio   Date   Time   CRC-32    Name
--------  ------  ------- -----   ----   ----   ------    ----
       0  Stored        0   0%  09-04-08 10:26  00000000  META-INF/
      71  Stored       71   0%  09-04-08 10:26  30f2b30e  META-INF/MANIFEST.MF
     401  Defl:X      276  31%  09-04-08 10:26  1701f5d1  Hello.class
--------          -------  ---                            -------
     472              347  27%                            3 files

while we generate:
Archive:  harmony.jar
PACK200
 Length   Method    Size  Ratio   Date   Time   CRC-32    Name
--------  ------  ------- -----   ----   ----   ------    ----
       0  Defl:N        2   0%  01-01-80 00:00  00000000  META-INF/
      71  Defl:N       71   0%  01-01-80 00:00  30f2b30e  META-INF/MANIFEST.MF
     401  Defl:N      276  31%  01-01-80 00:00  1701f5d1  Hello.class
--------          -------  ---                            -------
     472              349  26%                            3 files

The value passed into SegmentHeader.setArchiveModtime() is:
1220523974
which corresponds to Wed Jan 14 20:02:03 MST 1970.

This issue is minor here, but may be a huge defect if decode_scalar is coming up with the
wrong answer due to overflow / truncation issues.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message