Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2189

[C++] Seg. fault on make_shared<PoolBuffer>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.8.0
    • 0.10.0
    • C++
    • None
    • Debian jessie in a Docker container
      libarrow-dev 0.8.0-2 (Ubuntu trusty)

    Description

      When creating a PoolBuffer, I get a Segmentation fault when I use make_shared. If I use the shared_ptr constructor of reset, it works fine. Here is an example:

      #include <arrow/builder.h>
      
      int main()
      {
          arrow::MemoryPool* pool = arrow::default_memory_pool();
      
          arrow::Int64Builder builder(pool);
          builder.Append(1);
      
          // #1
          // std::shared_ptr<arrow::PoolBuffer> buffer(new arrow::PoolBuffer(pool));
          // #2
          // std::shared_ptr<arrow::PoolBuffer> buffer;
          // buffer.reset(new arrow::PoolBuffer(pool));
          // #3
          auto buffer = std::make_shared<arrow::PoolBuffer>(pool);
      }
      
      > g++-4.9 -std=c++11 -larrow foo.cpp && ./a.out
      Segmentation fault (core dumped)
      

      The example works fine with #1 or #2 options. It also works if the builder is commented out.

      Attachments

        1. foo.cpp
          0.5 kB
          Rares Vernica
        2. Dockerfile
          1 kB
          Rares Vernica

        Activity

          People

            wesm Wes McKinney
            rvernica Rares Vernica
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: