URL: https://github.com/SSSD/sssd/pull/96 Author: lslebodn Title: #96: CONFDB: Supress clang false passitive warnings Action: opened
PR body: """ The errno is macro expandee into '(*__errno_location ())'. The reason is that errno is private in glibc and and the function __errno_location return address of private errno.
sh$ objdump -T /lib64/libc.so.6 | grep errno 00000010 g D .tbss 00000004 GLIBC_PRIVATE errno 000208a0 g DF .text 00000011 GLIBC_2.2.5 __errno_location 001366b0 g DF .text 0000005f GLIBC_2.2.5 clnt_sperrno 00136710 g DF .text 00000074 GLIBC_2.2.5 clnt_perrno 00000064 g D .tbss 00000004 GLIBC_PRIVATE __h_errno 0011aad0 g DF .text 00000011 GLIBC_2.2.5 __h_errno_location
It looks like clang static analyzer assume that value can be changed due to function call.
errno = 0; val = strtol(values[0], NULL, 0); // Taking true branch => assuming "errno != 0" if (errno) { ret = errno; // errno was stored to ret but clang later assumes // that ret can be 0 goto failed; """
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/96/head:pr96 git checkout pr96
URL: https://github.com/SSSD/sssd/pull/96 Title: #96: CONFDB: Supress clang false passitive warnings
fidencio commented: """ Once you're already touching this part of the code, would you mind to use a explicit check? "(ret != 0)" instead of just "(ret)" ... """
See the full comment at https://github.com/SSSD/sssd/pull/96#issuecomment-263288184
URL: https://github.com/SSSD/sssd/pull/96 Author: lslebodn Title: #96: CONFDB: Supress clang false passitive warnings Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/96/head:pr96 git checkout pr96
URL: https://github.com/SSSD/sssd/pull/96 Title: #96: CONFDB: Supress clang false passitive warnings
lslebodn commented: """ On (28/11/16 06:42), fidencio wrote:
Once you're already touching this part of the code, would you mind to use a explicit check? "(ret != 0)" instead of just "(ret)" ...
Done,
Btw it isn't a new issue reported by clang static analyser. I just found a simple way how to make analyser happy :-)
LS
"""
See the full comment at https://github.com/SSSD/sssd/pull/96#issuecomment-263289752
URL: https://github.com/SSSD/sssd/pull/96 Title: #96: CONFDB: Supress clang false passitive warnings
fidencio commented: """ Acked-by: Fabiano Fidêncio fidencio@redhat.com """
See the full comment at https://github.com/SSSD/sssd/pull/96#issuecomment-263411367
URL: https://github.com/SSSD/sssd/pull/96 Title: #96: CONFDB: Supress clang false passitive warnings
Label: +Accepted
URL: https://github.com/SSSD/sssd/pull/96 Title: #96: CONFDB: Supress clang false passitive warnings
lslebodn commented: """ On (28/11/16 14:13), fidencio wrote:
Acked-by: Fabiano Fidêncio fidencio@redhat.com
Thank you for review.
master: * 13b1d270fb72cf2c2e18f0b2a59cb424c51f7675
LS
"""
See the full comment at https://github.com/SSSD/sssd/pull/96#issuecomment-263510851
URL: https://github.com/SSSD/sssd/pull/96 Title: #96: CONFDB: Supress clang false passitive warnings
Label: +Pushed
URL: https://github.com/SSSD/sssd/pull/96 Author: lslebodn Title: #96: CONFDB: Supress clang false passitive warnings Action: closed
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/96/head:pr96 git checkout pr96
sssd-devel@lists.fedorahosted.org