Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11193

Fix uninitialized variables in NativeIO.c

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.6.0
    • Component/s: native
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This was caught by TestNativeIO#testFstat test.

      Looks like an uninitialized variable mode below in NativeIO.c#Java_org_apache_hadoop_io_nativeio_NativeIO_00024POSIX_fstat around line ~278.

      ifdef WINDOWS
      LPWSTR owner = NULL;
      LPWSTR group = NULL;
      int mode;
      jstring jstr_owner = NULL;
      ...

      Test Report:

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running org.apache.hadoop.io.nativeio.TestNativeIO
      Tests run: 18, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 2.214 sec <<< FAILURE! - in org.apache.hadoop.io.native
      io.TestNativeIO
      testFstat(org.apache.hadoop.io.nativeio.TestNativeIO) Time elapsed: 0.514 sec <<< FAILURE!
      java.lang.AssertionError: Stat mode field should indicate a regular file expected:<32768> but was:<53248>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:743)
      at org.junit.Assert.assertEquals(Assert.java:118)
      at org.junit.Assert.assertEquals(Assert.java:555)
      at org.apache.hadoop.io.nativeio.TestNativeIO.testFstat(TestNativeIO.java:96)

      Results :

      Failed tests:
      TestNativeIO.testFstat:96 Stat mode field should indicate a regular file expected:<32768> but was:<53248>

      Tests run: 18, Failures: 1, Errors: 0, Skipped: 1

        Attachments

        1. HADOOP-11193.0.patch
          1 kB
          Xiaoyu Yao

          Activity

            People

            • Assignee:
              xyao Xiaoyu Yao
              Reporter:
              xyao Xiaoyu Yao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: