-
Notifications
You must be signed in to change notification settings - Fork 118
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 throws non-gzip_error #151
Comments
If I comment out the second catch block, I get the error: |
For the empty input case, the exception is being thrown from gzip.hpp, line 475 For the non-empty input case, the exception is being thrown from gzip.cpp, line 33 |
If you link statically, it works fine: |
If you build Boost yourself instead of using Homebrew, does it still fail? Do the tests for ThrowException pass? Does it work without |
Changing c++ std won't change the result. I have not tried to build boost from source, but I tried statically linking to homebrew boost and the issue disappeared as @mclow said above. |
Repro on my side as will, with x86 homebrew:
|
Here's one on CentOS 7 with self-built clang 12 and boost 1.78:
|
Similar crash on Debian 11 with self built clang-12 and boost 1.77
or with distro stock boost 1.74
|
Added
|
If I use libstdc++ on Linux it'll works, Both the apple clang and my self-built llvm on linux are pointing to libc++ by default.
|
And gcc-11 (devtoolset-11 on CentOS 7) is fine as well, it's using libstdc++. |
BTW my boost on Linux was initially built by gcc with libstdc++, so not sure if the mixed ABI contribute to the segfault. But I assume the homebrew one on mac is built by the same compiler (apple clang)? |
Compiled with Apple Clang 13.1.6 and boost 1.79. When the input is a non-empty invalid string, then the exception thrown by the decompressor cannot be caught as a gzip_error, even though
e.what()
says so.The text was updated successfully, but these errors were encountered: