You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Cornwall (JIRA)" <ji...@apache.org> on 2008/09/04 19:45:44 UTC

[jira] Created: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

[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.


[jira] Commented: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Sian January (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629189#action_12629189 ] 

Sian January commented on HARMONY-5970:
---------------------------------------

Thanks Andrew - patch applied at r693139.  Please check that it was applied as you expected.

> [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
>            Assignee: Sian January
>            Priority: Minor
>             Fix For: 5.0M8
>
>         Attachments: hello.jar, hello.pack.gz, main.patch, main.patch2
>
>
> 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.


[jira] Resolved: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Sian January (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sian January resolved HARMONY-5970.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.0M7)
                   5.0M8

> [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
>            Assignee: Sian January
>            Priority: Minor
>             Fix For: 5.0M8
>
>         Attachments: hello.jar, hello.pack.gz, main.patch, main.patch2
>
>
> 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.


[jira] Commented: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628436#action_12628436 ] 

Andrew Cornwall commented on HARMONY-5970:
------------------------------------------

This is a minor bug. The pack200 spec specifies modtimes as differences from the epoch in seconds; the JarEntry time is differences from the epoch in milliseconds. We weren't taking that into account. I'll have a patch ready soon.

> [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.


[jira] Updated: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5970:
-------------------------------------

    Attachment: hello.jar
                hello.pack.gz

Files hello.pack.gz and hello.jar (test case files with dates set). Note that on my filesystem, they have the following date stamps:

09/04/2008  10:26 AM               733 hello.jar
09/04/2008  10:26 AM               315 hello.pack.gz


> [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.


[jira] Updated: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5970:
-------------------------------------

    Attachment: main.patch

main.patch for unpack200.Segment to resolve this issue.

> [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, main.patch
>
>
> 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.


[jira] Updated: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5970:
-------------------------------------

    Priority: Minor  (was: Major)

> [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
>            Priority: Minor
>             Fix For: 5.0M7
>
>         Attachments: hello.jar, hello.pack.gz, main.patch
>
>
> 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.


[jira] Closed: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall closed HARMONY-5970.
------------------------------------

    Estimated Complexity: Novice  (was: Advanced)

Patch applied as expected. Thanks!


> [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
>            Assignee: Sian January
>            Priority: Minor
>             Fix For: 5.0M8
>
>         Attachments: hello.jar, hello.pack.gz, main.patch, main.patch2
>
>
> 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.


[jira] Assigned: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Sian January (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sian January reassigned HARMONY-5970:
-------------------------------------

    Assignee: Sian January

> [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
>            Assignee: Sian January
>            Priority: Minor
>             Fix For: 5.0M7
>
>         Attachments: hello.jar, hello.pack.gz, main.patch, main.patch2
>
>
> 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.


[jira] Updated: (HARMONY-5970) [pack200][classlib] SegmentHeader.archiveModtime is incorrect

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5970:
-------------------------------------

    Attachment: main.patch2

main.patch patch is almost right - but on my box, it appears one needs to adjust for TimeZone to be exactly accurate. Attached main.patch2 to correct this.

> [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
>            Priority: Minor
>             Fix For: 5.0M7
>
>         Attachments: hello.jar, hello.pack.gz, main.patch, main.patch2
>
>
> 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.