You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "James Clampffer (JIRA)" <ji...@apache.org> on 2015/10/30 16:08:27 UTC

[jira] [Updated] (HDFS-9320) libhdfspp should not use sizeof for stream parsing

     [ https://issues.apache.org/jira/browse/HDFS-9320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Clampffer updated HDFS-9320:
----------------------------------
    Attachment: HDFS-9320.HDFS-8707.000.patch

Added constants defining the size of java ints and shorts in datatransfer.h and use them in the corresponding parts of the wire protocol that implicitly rely on java's sizes.

Changed int to int32_t in places where there was bitwise operations just to be safe.

> libhdfspp should not use sizeof for stream parsing
> --------------------------------------------------
>
>                 Key: HDFS-9320
>                 URL: https://issues.apache.org/jira/browse/HDFS-9320
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Bob Hansen
>            Assignee: James Clampffer
>         Attachments: HDFS-9320.HDFS-8707.000.patch
>
>
> In a few places, we're using sizeof(int) and sizeof(short) to determine where in the received buffers we should be looking for data.  Those values are compiler- and platform-dependent.  We should use specified sizes, or at least sizeof(int32_t).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)