<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://en.cppreference.com/">here</a>.</p>
</body></html>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://en.cppreference.com/">here</a>.</p>
</body></html>
=================================================================
==60998==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 28 byte(s) in 1 object(s) allocated from:
#0 0x480ee4 in strdup (/home/nobodyxu/libcurl_bug+0x480ee4)
#1 0x7ff0330f39c5 (/lib/x86_64-linux-gnu/libcurl.so.4+0x589c5)
SUMMARY: AddressSanitizer: 28 byte(s) leaked in 1 allocation(s).
which shows that libcurl internally leaked 28 bytes.
I expected the following
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://en.cppreference.com/">here</a>.</p>
</body></html>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://en.cppreference.com/">here</a>.</p>
</body></html>
I did this
I compiled the following code with
clang++ -std=c++17 libcurl_bug.cc -lcurl -g -fsanitize=address -o libcurl_bug
:and here's the output:
which shows that
libcurl
internally leaked 28 bytes.I expected the following
curl/libcurl version
ldd /usr/lib/x86_64-linux-gnu/libcurl.so.4
gives me:The
libcurl
I am using is installed from pop!_os official apt source:operating system
The text was updated successfully, but these errors were encountered: