URL: https://github.com/freeipa/freeipa/pull/6085 Author: abbra Title: #6085: Fix use of comparison functions to avoid GCC bug 95189 Action: opened
PR body: """ Due to a bug in GCC 9 and GCC 10 optimizing code, all C library comparison functions should be used with explicit result comparison in the code to avoid problems described in
http://r6.ca/blog/20200929T023701Z.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
The code below is affected:
``` if (strcmp(a, b) || !strcmp(c, d)) ... ```
while the code below is not affected:
``` if (strcmp(a, b) != 0 || strcmp(c, d)) == 0 ```
for all C library cmp functions and related:
- strcmp(), strncmp() - strcasecmp(), strncasecmp() - stricmp(), strnicmp() - memcmp()
This PR idea is based on the pull request by 'Nicolas Williams nico@twosigma.com' to Heimdal Kerberos: https://github.com/heimdal/heimdal/pull/855
Signed-off-by: Alexander Bokovoy abokovoy@redhat.com """
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/6085/head:pr6085 git checkout pr6085
URL: https://github.com/freeipa/freeipa/pull/6085 Author: abbra Title: #6085: Fix use of comparison functions to avoid GCC bug 95189 Action: closed
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/6085/head:pr6085 git checkout pr6085
freeipa-devel@lists.fedorahosted.org