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/08 20:23:44 UTC
[jira] Closed: (HARMONY-5970) [pack200][classlib]
SegmentHeader.archiveModtime is incorrect
[ 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.