New Ghostscript/GhostPDL compiler warnings - 2017-11-08-06:15:04 - ea81364fdda57ce2c82007a150add5949a1c5788
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20171108155329.01F242040195@i7> |
Previous Revision: e1aead165e05e98ae765d6569f39ced839d4298e Current Revision: ea81364fdda57ce2c82007a150add5949a1c5788 commit ea81364fdda57ce2c82007a150add5949a1c5788 Author: Ken Sharp <[email protected]> AuthorDate: Wed Nov 8 14:04:42 2017 +0000 CommitDate: Wed Nov 8 14:04:42 2017 +0000 PS interpreter - fix detection of overflow on 64-bit integer multiply Bug 698722 "Erroneous Range-Check causes wrong arithmetic results" The work here was actually done by Robin Watts, ably assisted by Paul Gardiner. The previous code failed to properly detect an overflow condition, because the cast of MAX_PS_INT to a double reduces the precision to only 52 bits for the integer portion, meaning it was possible for very large numbers not to be detected as > MAX_PS_INT. psi/zarith.c Ghostscript: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609): ./psi/zarith.c:207:5: warning: no previous prototype for 'mul_64_64_overflowcheck' [-Wmissing-prototypes] http://miles.ghostscript.com:8080/artifex/ea81364fdda57ce2c82007a150add5949a1c5788/gs-gcc-warnings.txt new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./psi/zarith.c:207:5: warning: no previous prototype for function 'mul_64_64_overflowcheck' [-Wmissing-prototypes] int mul_64_64_overflowcheck(int64_t abc, int64_t def, int64_t *res) ^ http://miles.ghostscript.com:8080/artifex/ea81364fdda57ce2c82007a150add5949a1c5788/gs-clang-warnings.txt new scan-build warnings: ./psi/zarith.c:207:5: warning: no previous prototype for 'mul_64_64_overflowcheck' [-Wmissing-prototypes] int mul_64_64_overflowcheck(int64_t abc, int64_t def, int64_t *res) ^ http://miles.ghostscript.com:8080/artifex/ea81364fdda57ce2c82007a150add5949a1c5788/gs/index.html http://miles.ghostscript.com:8080/artifex/ea81364fdda57ce2c82007a150add5949a1c5788/gs-scan-build.txt