Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gzip_decompressor() Segmentation fault #149

Open
woojae-jang opened this issue Jul 20, 2022 · 2 comments
Open

gzip_decompressor() Segmentation fault #149

woojae-jang opened this issue Jul 20, 2022 · 2 comments

Comments

@woojae-jang
Copy link

Hi

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

#include <boost/filesystem.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <fstream>
#include <iostream>
#include <string>

using namespace std;
using namespace boost::filesystem;

int main(int argc, char** argv)
{
    boost::iostreams::filtering_streambuf<boost::iostreams::input> 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.

@mclow
Copy link
Contributor

mclow commented Jul 21, 2022

Another data point: I tried your program with boost trunk on Mac OS 10.15.7, and it ran w/o any problem.

@kmalinau
Copy link

kmalinau commented Jul 3, 2024

I am facing the same issue with boost 1.81.0. Did you finally resolve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants