SafeInt 3.0.14

Rating: No reviews yet
Downloads: 1856
Released: Feb 15, 2010
Updated: Jul 31, 2011 by dcleblanc
Dev status: Stable Help Icon

Downloads

Source Code SafeInt3.hpp
source code, 207K, uploaded Feb 16, 2010 - 1240 downloads
Source Code MultVerify.cpp
source code, 61K, uploaded Feb 16, 2010 - 154 downloads
Source Code TestMain.cpp
source code, 4K, uploaded Feb 16, 2010 - 131 downloads
Source Code SafeIntTest.cpp
source code, 7K, uploaded Feb 16, 2010 - 156 downloads
Source Code SafeIntGcc.hpp
source code, 1K, uploaded Feb 16, 2010 - 175 downloads

Release Notes

This release adds 64-bit intrinsic function support for the Microsoft x64 compiler, which makes 64-bit multiplication code much smaller and presumably faster. If something like intrinsics (e.g., _mul128) exist for gcc that we can use, please let me know, and I'll work on adding them.

It also corrects one more typo in the ill-fated 3.0.13 release that prevents it from compiling for one specific multiplication operation.

Remaining known work items:

1) Last time I checked, the version of gcc required by Apple didn't have sufficiently compliant template support, and won't compile. I need to merge in the changes that remove portions of the class so it will compile.

2) We should have a more comprehensive and thorough test harness for all other operations.

Files:

SafeInt3.hpp - the main int overflow class
SafeIntGcc.hpp - a header used to get SafeInt3.hpp compiling on gcc 4.3.2 and later
SafeIntTest.cpp - contains the compile-time sanity checks
TestMain.cpp - Calls main() for the run-time sanity checks
MultVerify.cpp - checks 64-bit multiplication operations for both throwing and non-throwing implementations

Version History:
3.0.13 - contains fixes where some template specializations were overly specialized, which caused problems for the gcc x64 compiler. Also contains a fix for a runtime bug where (int)-1 * (unsigned int64)0x80000000 failed when it should not have.
3.0.12 - Public branch from the original code that is used internally at Microsoft, numerous fixes needed because the gcc comiler is picky about different things than the Microsoft compiler.

Reviews for this release

No reviews yet for this release.