Uploaded image for project: 'Parquet'
  1. Parquet
  2. PARQUET-1623

[C++] Invalid memory access with a magic number of records

    XMLWordPrintableJSON

Details

    Description

      I've observed a crash due to an invalid memory access when trying to read a parquet file that I created with a single column of double-precision values that occupies a fixed amount of memory.  After some experimentation I found that the following unittest added to arrow-reader-writer-test.cc will fail when run in an ASAN build.

      TEST(TestArrowReadWrite, MultiDataPageMagicNumber) {
        const int num_rows = 262144;  // 2^18
      
        std::shared_ptr<Table> table;
        ASSERT_NO_FATAL_FAILURE(MakeDoubleTable(1, num_rows, 1, &table));
      
        std::shared_ptr<Table> result;
        ASSERT_NO_FATAL_FAILURE(
            DoSimpleRoundtrip(table, false, table->num_rows(), {}, &result));
      
        ASSERT_NO_FATAL_FAILURE(::arrow::AssertTablesEqual(*table, *result));
      }

       

      Attachments

        Issue Links

          Activity

            People

              hatem Hatem Helal
              hatem Hatem Helal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m