Describe the bug, including details regarding any error messages, version, and platform.
Hi everyone,
I am encountering a memory issue while cross-compiling Apache Arrow and Parquet on a WSL x86 Ubuntu environment targeting ARM64. Specifically, I'm facing a free() invalid pointer error when running a function in libparquet that involves string deletion in the ApplicationVersion class destructor.
Details of the Issue:
Environment: WSL x86 Ubuntu cross-compiling for ARM64.
Libraries: libarrow.so and libparquet.so are both compiled.
Issue: When I invoke a function from libparquet (which calls std::getline and other standard C++ string manipulations), the program crashes due to a memory issue when the ApplicationVersion destructor tries to free a string.
Observed Behavior:
Static linking of libstdc++: When I modified the build of Apache Arrow to statically link libstdc++, the getline issue in libarrow was resolved.
Issue persists in libparquet: However, libparquet still crashes with the same memory issue in the destructor of ApplicationVersion. The destructor tries to free memory for a string, but fails with a free() invalid pointer error.
What I have tried:
Static Linking of libstdc++: This resolved the issue for libarrow, but did not fix libparquet.
Checked ABI compatibility: Ensured that both libarrow and libparquet were compiled with the same ABI settings (-D_GLIBCXX_USE_CXX11_ABI=1).
Request for Help:
Has anyone encountered similar issues with cross-compiling Apache Arrow and Parquet for ARM64 on WSL or other environments?
Could this be an issue with memory management across shared libraries (libarrow.so and libparquet.so)?
What would be the best way to ensure consistent memory management between libarrow and libparquet?
Would statically linking libstdc++ for bothlibarrow and libparquet be a viable solution to this problem?
Any insights or suggestions would be highly appreciated!
Describe the bug, including details regarding any error messages, version, and platform.
Hi everyone,
I am encountering a memory issue while cross-compiling Apache Arrow and Parquet on a WSL x86 Ubuntu environment targeting ARM64. Specifically, I'm facing a
free() invalid pointer
error when running a function inlibparquet
that involves string deletion in theApplicationVersion
class destructor.Details of the Issue:
libarrow.so
andlibparquet.so
are both compiled.libparquet
(which callsstd::getline
and other standard C++ string manipulations), the program crashes due to a memory issue when theApplicationVersion
destructor tries to free a string.libstdc++
: When I modified the build of Apache Arrow to statically linklibstdc++
, thegetline
issue inlibarrow
was resolved.libparquet
: However,libparquet
still crashes with the same memory issue in the destructor ofApplicationVersion
. The destructor tries to free memory for a string, but fails with afree() invalid pointer
error.What I have tried:
libstdc++
: This resolved the issue forlibarrow
, but did not fixlibparquet
.libarrow
andlibparquet
were compiled with the same ABI settings (-D_GLIBCXX_USE_CXX11_ABI=1
).Request for Help:
libarrow.so
andlibparquet.so
)?libarrow
andlibparquet
?libstdc++
for bothlibarrow
andlibparquet
be a viable solution to this problem?Any insights or suggestions would be highly appreciated!
Thanks in advance for your help.
Component(s)
C++