-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
clang UBSAN issue in 'check_gzip_header()' #12618
Comments
Quoting from https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#ubsan-checks:
Hence, adding |
... to work around a clang ubsan warning. Fixes #12618
@gvanem Did you end up filing a Clang bug for this? |
@thesamesam There are approx 5000 issues there. So I don't feel like it. |
That's fine, although it doesn't really work that way wrt total count of open bugs. Some of them are very old and imported from Bugzilla, some are feature requests, etc. Different things are handled by different people. |
Ok then. I'll try to cook up a minimal example that demonstrates this UBSAN bug. |
I made an issue here. |
I did this
This is not an issue with libcurl per-se. But it seems clang + UBSAN is sensitive to a syntax
like
enum { a, b, c } func (args) ...
See below.But trying to build libcurl with clang-cl and UBSAN ("Undefined Behaviour AddressSanitizer"), caused this internal error in
clang while compiling the check_gzip_header()function. Clang report:
Attached is
c:\temp\content_encoding-6786a6.sh
: content_encoding-6786a6.sh.txtTrying to understand why, I modified the file into:
all is well. The same is commenting out
#define OLD_ZLIB_SUPPORT 1
.Not sure which of flags triggered this internal-error. But these were the ASAN/UBSAN flags I used:
I expected the following
A successful compilation of
content_encoding.c
.curl/libcurl version
Latest from
git master
operating system
Win-10 22H2.
The text was updated successfully, but these errors were encountered: