You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Rares Vernica (JIRA)" <ji...@apache.org> on 2018/03/31 21:39:00 UTC

[jira] [Commented] (ARROW-2189) [C++] Seg. fault on make_shared

    [ https://issues.apache.org/jira/browse/ARROW-2189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421483#comment-16421483 ] 

Rares Vernica commented on ARROW-2189:
--------------------------------------

[~kou] could this issue be caused by the differences in the {{rules}} file used to build Ubuntu Trusty packages vs. other Debian packages?
{code:java}
> diff debian/rules debian.ubuntu-trusty/rules
12,16c12
< 	dh $@ --with gir,autoreconf
< 
< override_dh_autoreconf:
< 	dh_autoreconf \
< 	  --sourcedirectory=c_glib
---
> 	dh $@ --with gir
25,30c21
< 	  -DARROW_PYTHON=ON \
< 	  -DARROW_BOOST_USE_SHARED=ON \
< 	  -DARROW_ORC=ON \
< 	  -DPythonInterp_FIND_VERSION=ON \
< 	  -DPythonInterp_FIND_VERSION_MAJOR=3 \
< 	  -DARROW_GPU=ON
---
> 	  -DARROW_ORC=ON
56a48,49
> 	mv debian/tmp/usr/lib/*/girepository-1.0/	\
> 	  debian/tmp/usr/lib/
{code}
 

> [C++] Seg. fault on make_shared<PoolBuffer>
> -------------------------------------------
>
>                 Key: ARROW-2189
>                 URL: https://issues.apache.org/jira/browse/ARROW-2189
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 0.8.0
>         Environment: Debian jessie in a Docker container
> libarrow-dev 0.8.0-2 (Ubuntu trusty)
>            Reporter: Rares Vernica
>            Priority: Major
>         Attachments: Dockerfile, foo.cpp
>
>
> 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:
> {code:java}
> #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);
> }
> {code}
> {code:java}
> > g++-4.9 -std=c++11 -larrow foo.cpp && ./a.out
> Segmentation fault (core dumped)
> {code}
> The example works fine with {{#1}} or {{#2}} options. It also works if the builder is commented out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)