-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
current master fails to configure - libprov dir is empty #359
Comments
You should perform |
UpdateAfter pulling libprov submodule, master configures and builds - but fails
Crash report:
When compiling engine with "-g", crash does not occur. It seems a compiler (Clang) bug, but a workaround would be nice, at least until Apple fixes it. I suspect it's related to |
Don't know how to deal with it... Do you have something like valgrind on mac? |
Alas, no. Might be able to use sanitizers, but... On a different MacOS machine (the most powerful of my Mac herd ;), I'm getting Provider test failing on the master (and keyexpimp working). Current (as of today) OpenSSL 3.0 dev (aka, master).
|
@levitte, looks like a Mac-specific(?) problem with XOF... |
Noted. I've seen something similar (not XOF related, though) in another provider I wrote. Maybe the reasons are similar... I'll have a look in a couple of days. |
I wonder if it's in any way related to the cause of this: randombit/botan#2802 (compiler bug)? |
It's a bit interesting, though, that the Github Actions don't fail. I wonder why that is... Why I see on the provider test failure above is that the Line 1213 in df3ead2
... and my current working hypothesis is that somehow, the attempt to change that doesn't quite work: Line 147 in df3ead2
I wonder if this might be a type coersion error in the compiler. Does the result change with this simple patch? diff --git a/gost_prov_mac.c b/gost_prov_mac.c
index ab04a9c..0948d37 100644
--- a/gost_prov_mac.c
+++ b/gost_prov_mac.c
@@ -144,7 +144,7 @@ static int mac_final(void *mctx, unsigned char *out, size_t *outl,
if (out != NULL) {
/* We ignore the error for GOST MDs that don't support setting
the size */
- EVP_MD_CTX_ctrl(gctx->dctx, EVP_MD_CTRL_XOF_LEN, gctx->mac_size, NULL);
+ EVP_MD_CTX_ctrl(gctx->dctx, EVP_MD_CTRL_XOF_LEN, (int)gctx->mac_size, NULL);
ret = EVP_DigestFinal_ex(gctx->dctx, out, &tmpoutl);
}
if (outl != NULL) |
I believe the test_keyexpimp failure may be related, but I thinkr @levitte's hypothesis is more relevant |
Because they don't use Clang with a CPU that has SSE4.1 enabled or detected? Or because their Clang is not v12? |
I'm afraid not:
And the complete log (including configuration and build): |
Ping...? |
Will try to play with the new clang on Friday |
Using clang 12.0.1, I get segfault on digest-with-provider. Will try to investigate. |
Test output:
|
I have just patched the test that was failing on linux. Could you please retry? |
Here's with the OpenSSL-3.0.0 (released): Here's with the OpenSSL-3.1.dev (master): And I still think that renaming "grashopper" to "kuznyechik", especially with that spelling, was a bad idea. As they say, "ugly as a mule". ;-) |
I think I found the culprit: Line 148 in 8efda32
It should be |
Could you please the corresponding fix? index ab04a9c..1bad120 100644
--- a/gost_prov_mac.c
+++ b/gost_prov_mac.c
@@ -145,7 +145,7 @@ static int mac_final(void *mctx, unsigned char *out, size_t *outl,
/* We ignore the error for GOST MDs that don't support setting
the size */
EVP_MD_CTX_ctrl(gctx->dctx, EVP_MD_CTRL_XOF_LEN, gctx->mac_size, NULL);
- ret = EVP_DigestFinal_ex(gctx->dctx, out, &tmpoutl);
+ ret = EVP_DigestFinalXOF(gctx->dctx, out, gctx->mac_size);
}
if (outl != NULL)
*outl = (size_t)gctx->mac_size; |
Funny. This change made things worse - now two tests fail: ossl3m-build.txt Crash report doesn't help much:
|
Do I correctly assume that you've updated the code and applied the patch afterwards? |
Yes. But I don't see any updates...? Latest commit from you that I pulled is 8efda32. And on the |
Yes, it's a relevant state +patch from #359 (comment) |
Yes, that's the current status of the code on my machines. Plus, same error with both OpenSSL_3.0.0 and 3.1.dev. |
MacOS Big Sur 11.6, Xcode-13.0 (both factors irrelevant, IMHO).
The text was updated successfully, but these errors were encountered: