Skip to content
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

Please pickup Commit 0b5747421b27 for CMake #3

Closed
noloader opened this issue Aug 25, 2022 · 0 comments
Closed

Please pickup Commit 0b5747421b27 for CMake #3

noloader opened this issue Aug 25, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@noloader
Copy link
Collaborator

noloader commented Aug 25, 2022

Crypto++ is working around a code generation bug when using GCC 12 on Linux. The bug is, GCC 12 is removing live code and its causing the test program to crash. Also see Crypto++ Issue 1141 and Commit 0b5747421b27. This is a GCC bug and workaround. It is not a bug in Crypto++.

We have a workaround which uses the compile flag -fno-devirtualize. CMake needs the logic to add -fno-devirtualize when appropriate. Commit 0b5747421b27 adds a test program and the makefile runs the test program with the option -fno-devirtualize. If on Linux with GCC 12 or above, then the test program will succeed. Otherwise the test program will fail. If the test program succeeds, then CMake needs to do the equivalent to CXXFLAGS += -fno-devirtualize.

We released Crypto++ 8,7 on August 7, 2022. We are planning for a Crypto++ 8.8 release around September 7 to get the latest problems off the books. The 8.8 release will include this workaround.

For completeness, GCC 12 is starting to show up in distros. At the time of this writing, it is available in Debian Unstable, Fedora 37 and Gentoo. Eventually (in a couple of years) it will show up in a lot of places.

@abdes abdes self-assigned this Aug 25, 2022
@abdes abdes added the bug Something isn't working label Aug 25, 2022
abdes added a commit that referenced this issue Sep 20, 2022
abdes added a commit that referenced this issue Sep 23, 2022
@abdes abdes closed this as completed Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants