8498 ficl: variable 'count' might be clobbered by 'longjmp' or 'vfork'
Review Request #626 — Created July 15, 2017 and submitted
Information | |
---|---|
tsoome | |
illumos-gate | |
8498 | |
71f47a3... | |
Reviewers | |
general | |
/code/illumos-gate/usr/src/common/ficl/vm.c:255:6: error: variable 'count' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] int count; ^~~~~ cc1: all warnings being treated as errors
-
-
usr/src/common/ficl/vm.c (Diff revision 1) Could you, please, add comment here about 'volatile' and setjump ?
Change Summary:
Comment added for count.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+1 -1) |
Change Summary:
cstyle fix
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+1 -1) |
Change Summary:
Unfortunately the idea does not really work - declaring count volatile does calm gcc 7, but does upset gcc 4.4.4 to think the argument fw will be cobbered. As I do not have better ideas, I'm just using #pragma here for now.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+1) |
Change Summary:
Workaround for gcc 4.4.4/gcc 7 disagreeing. Maybe too big hammer, but apparently gcc has issues with this warning...
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+5) |
-
-
usr/src/common/ficl/vm.c (Diff revision 3) I think you should leave count as volatile to make the code correct. I'm okay with added -Wno-clobbered to silence gcc 4.4.
Change Summary:
tag count as volatile.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+6 -1) |
-
-
usr/src/lib/libficl/Makefile.com (Diff revision 6) I think this comment should be reworded, since "if marked volatile" actually happened.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+6 -1) |