Deprecate most of debug-memory#10572
Deprecate most of debug-memory#10572richsalz wants to merge 3 commits intoopenssl:masterfrom richsalz:rm-mdebug
Conversation
|
Question for @slontis: since crypto-mdebug only does the counts and malloc-fail stuff, does it make sense to put something put an error in configure if you try to enable both? |
Probably not necessary :) |
|
The memleaktest stuff needs to be revisited after #9294 gets merged. For now I had to comment out the "leak" test. Fixup commit pushed. |
Fixes #8322 The leak-checking (and backtrace option, on some platforms) provided by crypto-mdebug and crypto-mdebug-backtrace have been mostly neutered; only the "make malloc fail" capability remains. OpenSSL recommends using the compiler's leak-detection instead. The OPENSSL_DEBUG_MEMORY environment variable is no longer used. CRYPTO_mem_ctrl(), CRYPTO_set_mem_debug(), CRYPTO_mem_leaks(), CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return a failure code. CRYPTO_mem_debug_{malloc,realloc,free}() have been removed. All of the above are now deprecated. Merge (now really small) mem_dbg.c into mem.c
|
Resolved conflicts, squashed, pushed. |
|
Travis failure is a timeout on Mac, after all tests passed. |
| system (through Gnulib), the functions might just be stubs | ||
| that do nothing. | ||
| This is a no-op; the project uses the compiler's | ||
| address/leak sanitizer instead. |
There was a problem hiding this comment.
In Configure, there's the hash table %deprecated_disablables. "crypto-mdebug-backtrace" should be removed from @disablables and added to %deprecated_disablables, like this:
diff --git a/Configure b/Configure
index 22082deb4c..38b26b7d4f 100755
--- a/Configure
+++ b/Configure
@@ -366,7 +366,6 @@ my @disablables = (
"cms",
"comp",
"crypto-mdebug",
- "crypto-mdebug-backtrace",
"ct",
"deprecated",
"des",
@@ -463,6 +462,7 @@ my @disablables_int = qw(
my %deprecated_disablables = (
"ssl2" => undef,
"buf-freelists" => undef,
+ "crypto-mdebug-backtrace" => undef,
"hw" => "hw", # causes cascade, but no macro
"hw-padlock" => "padlockeng",
"ripemd" => "rmd160",It could be that "crypto-mdebug" should be renamed to "failed-macro", with deprecation of the old name. That would look like this:
diff --git a/Configure b/Configure
index 22082deb4c..5ee0955c5c 100755
--- a/Configure
+++ b/Configure
@@ -365,7 +365,6 @@ my @disablables = (
"cmp",
"cms",
"comp",
- "crypto-mdebug",
"crypto-mdebug-backtrace",
"ct",
"deprecated",
@@ -386,6 +385,7 @@ my @disablables = (
"engine",
"err",
"external-tests",
+ "failed-malloc",
"filenames",
"fips",
"fuzz-libfuzzer",
@@ -463,6 +463,7 @@ my @disablables_int = qw(
my %deprecated_disablables = (
"ssl2" => undef,
"buf-freelists" => undef,
+ "crypto-mdebug" => "failed-malloc",
"hw" => "hw", # causes cascade, but no macro
"hw-padlock" => "padlockeng",
"ripemd" => "rmd160",You may need to check how that affects the feature macros (look in the generated include/openssl/opensslconf.h)
There was a problem hiding this comment.
I did the deprecation. I don't want to add a new (esp new aliased!) ifdef. Also, malloc-failing is used for debugging :)
|
fixup commit pushed. |
|
Travis failure seems unrelated. |
|
ding, ready to merge. |
Fixes #8322 The leak-checking (and backtrace option, on some platforms) provided by crypto-mdebug and crypto-mdebug-backtrace have been mostly neutered; only the "make malloc fail" capability remains. OpenSSL recommends using the compiler's leak-detection instead. The OPENSSL_DEBUG_MEMORY environment variable is no longer used. CRYPTO_mem_ctrl(), CRYPTO_set_mem_debug(), CRYPTO_mem_leaks(), CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return a failure code. CRYPTO_mem_debug_{malloc,realloc,free}() have been removed. All of the above are now deprecated. Merge (now really small) mem_dbg.c into mem.c Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from #10572)
Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from #10572)
|
Now that this is merged I get errors during compilation if I configure with: It disappears if I don't use What am I missing? |
|
Also, when configuring only with |
|
Please look at #10629 Sorry. |
The leak-checking (and backtrace option, on some platforms) provided
by crypto-mdebug and crypto-mdebug-backtrace have been mostly neutered;
only the "make malloc fail" capability remains. OpenSSL recommends using
clang leak-detection instead.
The OPENSSL_DEBUG_MEMORY environment variable is no longer used.
CRYPTO_mem_ctrl(), CRYPTO_set_mem_debug(), CRYPTO_mem_leaks(),
CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return a failure code.
CRYPTO_mem_debug_{malloc,realloc,free}() have been removed. All of the
above are now deprecated.