You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Fedotov (JIRA)" <ji...@apache.org> on 2008/03/14 20:26:24 UTC

[jira] Created: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

[drlvm][classloader] using size_t type instead of int for x86_64 compatibility
------------------------------------------------------------------------------

                 Key: HARMONY-5610
                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Alexei Fedotov
         Attachments: classloader_size_t.patch

On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Commented: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579360#action_12579360 ] 

Pavel Pervov commented on HARMONY-5610:
---------------------------------------

Alexei,

AFAIK, MAX_PATH is always lesser then MAX_INT. Key name length is also not expected to have length greater than MAX_INT.

I see this patch as fixing warnings on x86-64 platforms, most probably Windows. Am I right?

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>         Attachments: classloader_size_t.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Assigned: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

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

Pavel Pervov reassigned HARMONY-5610:
-------------------------------------

    Assignee: Pavel Pervov

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>            Assignee: Pavel Pervov
>         Attachments: classloader_size_t.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Closed: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

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

Alexei Fedotov closed HARMONY-5610.
-----------------------------------


Thanks, Pavel. Verified.

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>            Assignee: Pavel Pervov
>         Attachments: classloader_size_t.patch, classloader_size_t_1.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Commented: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

Posted by "Alexei Fedotov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579365#action_12579365 ] 

Alexei Fedotov commented on HARMONY-5610:
-----------------------------------------

Sure Pavel. More exactly, it fixes warnings for x86 platform: msvc 2005 is so clever that it reports possible portability issues.

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>         Attachments: classloader_size_t.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Commented: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

Posted by "Alexei Fedotov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579462#action_12579462 ] 

Alexei Fedotov commented on HARMONY-5610:
-----------------------------------------

Pavel, I agree with adding two type conversions.

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>            Assignee: Pavel Pervov
>         Attachments: classloader_size_t.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Updated: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

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

Alexei Fedotov updated HARMONY-5610:
------------------------------------

    Attachment: classloader_size_t.patch

The attached patch fixes type warnings related to misuse of int instead of size_t .

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>         Attachments: classloader_size_t.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Commented: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579756#action_12579756 ] 

Pavel Pervov commented on HARMONY-5610:
---------------------------------------

Alexei,

could you, please, update the patch. I promise to commit it as soon as pre-commit testing is restored.

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>            Assignee: Pavel Pervov
>         Attachments: classloader_size_t.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Resolved: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

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

Pavel Pervov resolved HARMONY-5610.
-----------------------------------

    Resolution: Fixed

Committed revision 641266.

Please, check that warnings has gone.

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>            Assignee: Pavel Pervov
>         Attachments: classloader_size_t.patch, classloader_size_t_1.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Updated: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

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

Alexei Fedotov updated HARMONY-5610:
------------------------------------

    Attachment: classloader_size_t_1.patch

Pavel, here is an updated patch. With seven type casts it does not look as nice as before to me, but this is just a question of personal taste.

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>            Assignee: Pavel Pervov
>         Attachments: classloader_size_t.patch, classloader_size_t_1.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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


[jira] Commented: (HARMONY-5610) [drlvm][classloader] using size_t type instead of int for x86_64 compatibility

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579390#action_12579390 ] 

Pavel Pervov commented on HARMONY-5610:
---------------------------------------

I'd made a conversion of types rather than changing parameter types of functions...
If you still not convinced and prefer changing parameter types, then change them consistently, please.

> [drlvm][classloader] using size_t type instead of int for x86_64 compatibility
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-5610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5610
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexei Fedotov
>         Attachments: classloader_size_t.patch
>
>
> On 64-bit platforms size_t may be occasionally longer than int. It is safer to use size_t while working with size_t strlen() results.

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