Commit a65227d
committed
shared: ensure errno always zero on entering main
standards do not require errno to be reset to zero before entering
main, third party libraries like openssl and libcap(1) use ELF
constructors that if buggy (1) will clobber errno value to everybody
else.
Libselinux also clobbers errno in most tests cases (2) ensure that is
set to zero before starting.
(1) https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=f25a1b7e69f7b33e6afb58b3e38f3450b7d2d9a0
(2) SELinuxProject/selinux#4451 parent 6fd5853 commit a65227d
File tree
2 files changed
+2
-0
lines changed2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
0 commit comments