boostorg / boostorg/iostreams

gzip_decompressor() Segmentation fault

Open
#149 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
48
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Hi

Using the boost library, I was trying to read the gzip file. But i faced the Segmentation fault error.

```cpp
#include
#include
#include
#include
#include
#include

using namespace std;
using namespace boost::filesystem;

int main(int argc, char** argv)
{
boost::iostreams::filtering_streambuf inbuf;
inbuf.push(boost::iostreams::gzip_decompressor());

return 0;
}
```

> Segmentation fault (core dumped)

> ==8215==The signal is caused by a READ memory access. #0 0x56360f5f70c8 in boost::iostreams::detail::gzip_header::reset() (/root/build/bin/test+0x900c8) #1 0x56360f5a14a4 in boost::iostreams::detail::gzip_header::gzip_header() /root/.conan/data/boost/1.79.0///package/adf48b8e4446dcb68f440fe42ff08878d5c7feed/include/boost/iostreams/filter/gzip.hpp:327 #2 0x56360f5a29c0 in boost::iostreams::basic_gzip_decompressorstd::allocator::basic_gzip_decompressor(int, long) /root/.conan/data/boost/1.79.0///package/adf48b8e4446dcb68f440fe42ff08878d5c7feed/include/boost/iostreams/filter/gzip.hpp:736 #3 0x56360f59c091 in main /root/playground/main.cpp:14 #4 0x7f3063f530b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #5 0x56360f59bedd in _start (/root/build/bin/test+0x34edd)

**i used boost 1.79.0 with conan on Ubuntu 20.04.3 LTS**

I have posted the same question on [stackoverflow](https://stackoverflow.com/questions/73043573/boost-gzip-filter-segmentation-fault-core-dumped-error).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.