summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dda7111)
To force it on anyone using --strict-warnings was the wrong move, as
this is an option best left to those who know what they're doing.
Use with care!
Reviewed-by: Andy Polyakov <appro@openssl.org>
. " -Wmissing-variable-declarations"
;
. " -Wmissing-variable-declarations"
;
-# These are used in addition to $gcc_devteam_warn unless this is a mingw build.
-# This adds backtrace information to the memory leak info.
-my $memleak_devteam_backtrace = "-rdynamic -DCRYPTO_MDEBUG_BACKTRACE";
+# This adds backtrace information to the memory leak info. Is only used
+# when crypto-mdebug-backtrace is enabled.
+my $memleak_devteam_backtrace = "-rdynamic";
"cms",
"comp",
"crypto-mdebug",
"cms",
"comp",
"crypto-mdebug",
+ "crypto-mdebug-backtrace",
"ct",
"deprecated",
"des",
"ct",
"deprecated",
"des",
# SRP and HEARTBEATS require TLSEXT
"tlsext" => [ "srp", "heartbeats" ],
# SRP and HEARTBEATS require TLSEXT
"tlsext" => [ "srp", "heartbeats" ],
+
+ "crypto-mdebug" => [ "crypto-mdebug-backtrace" ],
);
# Avoid protocol support holes. Also disable all versions below N, if version
);
# Avoid protocol support holes. Also disable all versions below N, if version
$config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
}
}
$config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
}
}
- if ($target !~ /^mingw/)
+ }
+
+unless ($disabled{"crypto-mdebug-backtrace"})
+ {
+ foreach my $wopt (split /\s+/, $memleak_devteam_backtrace)
- foreach $wopt (split /\s+/, $memleak_devteam_backtrace)
- {
- $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
- }
- if ($target =~ /^BSD-/)
- {
- $config{ex_libs} .= " -lexecinfo";
- }
+ $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
+ }
+ if ($target =~ /^BSD-/)
+ {
+ $config{ex_libs} .= " -lexecinfo";
#include <openssl/buffer.h>
#include <openssl/bio.h>
#include <openssl/lhash.h>
#include <openssl/buffer.h>
#include <openssl/bio.h>
#include <openssl/lhash.h>
-#if defined(CRYPTO_MDEBUG_BACKTRACE) && defined(__GNUC__)
+
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
# include <execinfo.h>
#endif
# include <execinfo.h>
#endif
unsigned long order;
time_t time;
APP_INFO *app_info;
unsigned long order;
time_t time;
APP_INFO *app_info;
-#if defined(CRYPTO_MDEBUG_BACKTRACE) && defined(__GNUC__)
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
void *array[30];
size_t array_siz;
#endif
void *array[30];
size_t array_siz;
#endif
m->order = order;
}
m->order = order++;
m->order = order;
}
m->order = order++;
-# if defined(CRYPTO_MDEBUG_BACKTRACE) && defined(__GNUC__)
+# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
m->array_siz = backtrace(m->array, OSSL_NELEM(m->array));
# endif
m->time = time(NULL);
m->array_siz = backtrace(m->array, OSSL_NELEM(m->array));
# endif
m->time = time(NULL);
if (mp != NULL) {
mp->addr = addr2;
mp->num = num;
if (mp != NULL) {
mp->addr = addr2;
mp->num = num;
-#if defined(CRYPTO_MDEBUG_BACKTRACE) && defined(__GNUC__)
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
mp->array_siz = backtrace(mp->array, OSSL_NELEM(mp->array));
#endif
(void)lh_MEM_insert(mh, mp);
mp->array_siz = backtrace(mp->array, OSSL_NELEM(mp->array));
#endif
(void)lh_MEM_insert(mh, mp);
while (amip && !CRYPTO_THREADID_cmp(&amip->threadid, &ti));
}
while (amip && !CRYPTO_THREADID_cmp(&amip->threadid, &ti));
}
-#if defined(CRYPTO_MDEBUG_BACKTRACE) && defined(__GNUC__)
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
{
size_t i;
char **strings = backtrace_symbols(m->array, m->array_siz);
{
size_t i;
char **strings = backtrace_symbols(m->array, m->array_siz);