Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 746749

Summary: >=sys-devel/gcc-9: memcmp stripped wrongly
Product: Gentoo Linux Reporter: Luke-Jr <luke-jr+gentoobugs>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: jaco, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gcc.gnu.org/PR95189
Whiteboard: wait for upstream release
Package list:
Runtime testing required: ---

Description Luke-Jr 2020-10-05 18:26:37 UTC
I'm surprised if this isn't a duplicate, but I can't find a bug for it...

GCC 9 and 10 will in some circumstances "optimise" a memcmp to always return zero.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189

I'm not aware of any security implications or other practical problems, but it has the potential to be quite harmful in theory.
Comment 1 Jaco Kroon 2020-12-22 18:32:07 UTC
sox package affected too.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-29 07:01:32 UTC
Should be fixed in gcc-11.1 and gcc-10.3