<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/curl.git/lib/memdebug.c, branch bagder/test493-https</title>
<subtitle>github.com: bagder/curl.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/'/>
<entry>
<title>copyright: update copyright year ranges to 2021</title>
<updated>2021-03-27T22:00:14+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2021-03-27T11:52:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=85e6975643fe52d6c4152969e2353f3ab8ea4554'/>
<id>85e6975643fe52d6c4152969e2353f3ab8ea4554</id>
<content type='text'>
Reviewed-by: Emil Engler
Closes #6802
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Emil Engler
Closes #6802
</pre>
</div>
</content>
</entry>
<entry>
<title>memdebug: close debug logfile explicitly on exit</title>
<updated>2021-02-20T19:40:24+00:00</updated>
<author>
<name>Jay Satiro</name>
<email>raysatiro@yahoo.com</email>
</author>
<published>2021-02-17T22:46:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=eb36c03e83ecc110bb14480fca911ef45621f24a'/>
<id>eb36c03e83ecc110bb14480fca911ef45621f24a</id>
<content type='text'>
- Use atexit to register a dbg cleanup function that closes the logfile.

LeakSantizier (LSAN) calls _exit() instead of exit() when a leak is
detected on exit so the logfile must be closed explicitly or data could
be lost. Though _exit() does not call atexit handlers such as this,
LSAN's call to _exit() comes after the atexit handlers are called.

Prior to this change the logfile was not explicitly closed so it was
possible that if LSAN detected a leak and called _exit (which does
not flush or close files like exit) then the logfile could be missing
data. That could then cause curl's memanalyze to report false leaks
(eg a malloc was recorded to the logfile but the corresponding free was
discarded from the buffer instead of written to the logfile, then
memanalyze reports that as a leak).

Ref: https://github.com/google/sanitizers/issues/1374

Bug: https://github.com/curl/curl/pull/6591#issuecomment-780396541

Closes https://github.com/curl/curl/pull/6620
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Use atexit to register a dbg cleanup function that closes the logfile.

LeakSantizier (LSAN) calls _exit() instead of exit() when a leak is
detected on exit so the logfile must be closed explicitly or data could
be lost. Though _exit() does not call atexit handlers such as this,
LSAN's call to _exit() comes after the atexit handlers are called.

Prior to this change the logfile was not explicitly closed so it was
possible that if LSAN detected a leak and called _exit (which does
not flush or close files like exit) then the logfile could be missing
data. That could then cause curl's memanalyze to report false leaks
(eg a malloc was recorded to the logfile but the corresponding free was
discarded from the buffer instead of written to the logfile, then
memanalyze reports that as a leak).

Ref: https://github.com/google/sanitizers/issues/1374

Bug: https://github.com/curl/curl/pull/6591#issuecomment-780396541

Closes https://github.com/curl/curl/pull/6620
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: remove redundant code</title>
<updated>2021-02-10T15:47:27+00:00</updated>
<author>
<name>Marcel Raad</name>
<email>Marcel.Raad@teamviewer.com</email>
</author>
<published>2021-02-07T08:29:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=1cd823ed5ab590636fab218741dbf0a61f1d3157'/>
<id>1cd823ed5ab590636fab218741dbf0a61f1d3157</id>
<content type='text'>
Closes https://github.com/curl/curl/pull/6576
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes https://github.com/curl/curl/pull/6576
</pre>
</div>
</content>
</entry>
<entry>
<title>curl.se: new home</title>
<updated>2020-11-04T22:59:47+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-11-04T13:02:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=4d2f8006777d6354d9b62eae38ebd0a0256d0f94'/>
<id>4d2f8006777d6354d9b62eae38ebd0a0256d0f94</id>
<content type='text'>
Closes #6172
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #6172
</pre>
</div>
</content>
</entry>
<entry>
<title>memdebug: remove 9 year old unused debug function</title>
<updated>2020-09-28T20:15:21+00:00</updated>
<author>
<name>Emil Engler</name>
<email>me@emilengler.com</email>
</author>
<published>2020-09-17T15:13:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=82d66f15825b2a088ba9302e2917e0548b1fe75f'/>
<id>82d66f15825b2a088ba9302e2917e0548b1fe75f</id>
<content type='text'>
There used to be a way to have memdebug fill allocated memory. 9 years
later this has no value there (valgrind and ASAN etc are way better). If
people need to know about it they can have a look at VCS logs.

Closes #5973
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There used to be a way to have memdebug fill allocated memory. 9 years
later this has no value there (valgrind and ASAN etc are way better). If
people need to know about it they can have a look at VCS logs.

Closes #5973
</pre>
</div>
</content>
</entry>
<entry>
<title>curl: improve the existing file check with -J</title>
<updated>2020-07-28T21:28:40+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-07-27T10:44:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=81b4e99b1e1a5a6ac06bcfba1bf4464085ea9688'/>
<id>81b4e99b1e1a5a6ac06bcfba1bf4464085ea9688</id>
<content type='text'>
Previously a file that isn't user-readable but is user-writable would
not be properly avoided and would get overwritten.

Reported-by: BrumBrum on hackerone
Assisted-by: Jay Satiro
Bug: https://hackerone.com/reports/926638
Closes #5731
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously a file that isn't user-readable but is user-writable would
not be properly avoided and would get overwritten.

Reported-by: BrumBrum on hackerone
Assisted-by: Jay Satiro
Bug: https://hackerone.com/reports/926638
Closes #5731
</pre>
</div>
</content>
</entry>
<entry>
<title>memdebug: don't log free(NULL)</title>
<updated>2020-03-31T07:44:23+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-03-30T21:51:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=14dd0c020072c161827a75e3a4a236f134a8960c'/>
<id>14dd0c020072c161827a75e3a4a236f134a8960c</id>
<content type='text'>
... it serves no purpose and fills up the log.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... it serves no purpose and fills up the log.
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: reduce variable scopes</title>
<updated>2019-05-20T06:51:11+00:00</updated>
<author>
<name>Marcel Raad</name>
<email>Marcel.Raad@teamviewer.com</email>
</author>
<published>2019-05-11T19:42:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=10db3ef21eef1c7a1727579952a81ced2f4afc8b'/>
<id>10db3ef21eef1c7a1727579952a81ced2f4afc8b</id>
<content type='text'>
Fixes Codacy/CppCheck warnings.

Closes https://github.com/curl/curl/pull/3872
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes Codacy/CppCheck warnings.

Closes https://github.com/curl/curl/pull/3872
</pre>
</div>
</content>
</entry>
<entry>
<title>memdebug: fix variable name</title>
<updated>2019-04-22T07:10:05+00:00</updated>
<author>
<name>Gisle Vanem</name>
<email>gisle.vanem@gmail.com</email>
</author>
<published>2019-04-22T07:04:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=b21701c54ba050145246e89c5137015479c65f7e'/>
<id>b21701c54ba050145246e89c5137015479c65f7e</id>
<content type='text'>
Follow-up to 76b6348 which renamed logfile as curl_dbg_logfile.

Ref: https://github.com/curl/curl/commit/76b6348#r33259088
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up to 76b6348 which renamed logfile as curl_dbg_logfile.

Ref: https://github.com/curl/curl/commit/76b6348#r33259088
</pre>
</div>
</content>
</entry>
<entry>
<title>memdebug: log pointer before freeing its data</title>
<updated>2019-03-12T20:45:03+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2019-03-12T07:37:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=401cb929543e3370726574c01fd90d965c5b3c60'/>
<id>401cb929543e3370726574c01fd90d965c5b3c60</id>
<content type='text'>
Coverity warned for two potentional "Use after free" cases. Both are false
positives because the memory wasn't used, it was only the actual pointer
value that was logged.

The fix still changes the order of execution to avoid the warnings.

Coverity CID 1443033 and 1443034

Closes #3671
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity warned for two potentional "Use after free" cases. Both are false
positives because the memory wasn't used, it was only the actual pointer
value that was logged.

The fix still changes the order of execution to avoid the warnings.

Coverity CID 1443033 and 1443034

Closes #3671
</pre>
</div>
</content>
</entry>
</feed>
