global_init: debug builds allocates a byte in init

... to make build tools/valgrind warn if no curl_global_cleanup is
called.

This is conditionally only done for debug builds with the env variable
CURL_GLOBAL_INIT set.

Closes #6410
This commit is contained in:
Daniel Stenberg 2021-01-05 00:03:57 +01:00
parent 75f7ab28d2
commit 9d7281ff17
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 15 additions and 1 deletions

View file

@ -381,6 +381,7 @@ if (!$USER) {
$ENV{'CURL_MEMDEBUG'} = $memdump;
$ENV{'CURL_ENTROPY'}="12345678";
$ENV{'CURL_FORCETIME'}=1; # for debug NTLM magic
$ENV{'CURL_GLOBAL_INIT'}=1; # debug curl_global_init/cleanup use
$ENV{'HOME'}=$pwd;
$ENV{'COLUMNS'}=79; # screen width!