You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2010/09/14 04:39:35 UTC

[jira] Commented: (HARMONY-6639) [classlib][luni]fd's passed c functions needs casting from long to int to avoid potential problems

    [ https://issues.apache.org/jira/browse/HARMONY-6639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909096#action_12909096 ] 

Hudson commented on HARMONY-6639:
---------------------------------

Integrated in Harmony-1.5-head-linux-x86_64 #942 (See [https://hudson.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/942/])
    Applied patches (Mohan's and all but the duplicate chunk from Cath's)
from "[#HARMONY-6639] [classlib][luni]fd's passed c
functions needs casting from long to int to avoid potential problems".


> [classlib][luni]fd's passed c functions needs casting from long to int to avoid potential problems
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6639
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6639
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: All Unix platforms 
>            Reporter: Mohanraj Loganathan
>            Assignee: Mark Hindess
>         Attachments: 6639-2.patch, 6639.patch, HARMONY-6639.patch
>
>
> fd's passed c functions needs casting from long to int to avoid potential problems
> Consider the functions below. Here fd is jlong. But both the functions will accept int. So this may cause some potential issues.
> mmap(0, (size_t)(size&0x7fffffff), prot, flags, fd-FD_BIAS, (off_t)(alignment&0x7fffffff));
> fstat((int)fd - FD_BIAS, &statbuf)
> typecasting them to int will avoid the truncation issues.

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