<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>SafeInt</title><link>http://safeint.codeplex.com/project/feeds/rss</link><description>SafeInt is a C&amp;#43;&amp;#43; template class designed to make dealing with integer overflows easy.</description><item><title>Reopened Issue: bug gcc 4.3.2 and 4.4.1 int64_t [8791]</title><link>http://safeint.codeplex.com/workitem/8791</link><description>i try to use multiply on int64_t&lt;br /&gt;&amp;#160;&lt;br /&gt;  boost&amp;#58;&amp;#58;int64_t a&amp;#61;2&amp;#59;&lt;br /&gt;  boost&amp;#58;&amp;#58;int64_t b&amp;#61;3&amp;#59;&lt;br /&gt;  boost&amp;#58;&amp;#58;int64_t c&amp;#59;&lt;br /&gt;  SafeMultiply&amp;#60;boost&amp;#58;&amp;#58;int64_t,boost&amp;#58;&amp;#58;int64_t&amp;#62;&amp;#40;a,b,c&amp;#41;&amp;#59;&lt;br /&gt;&amp;#160;&lt;br /&gt;gcc 4.3.2 and 4.4.1 takes compile time error&lt;br /&gt;&amp;#160;&lt;br /&gt;SafeInt3.hpp&amp;#58; In function &amp;#8216;bool SafeMultiply&amp;#40;T, U, T&amp;#38;&amp;#41; &amp;#91;with T &amp;#61; long int, U &amp;#61; long int&amp;#93;&amp;#8217;&amp;#58;&lt;br /&gt;test1.cpp&amp;#58;233&amp;#58;   instantiated from here&lt;br /&gt;SafeInt3.hpp&amp;#58;4995&amp;#58; error&amp;#58; incomplete type &amp;#8216;MultiplicationHelper&amp;#60;long int, long int, 11&amp;#62;&amp;#8217; used in nested name specifier&lt;br /&gt;</description><author>dcleblanc</author><pubDate>Fri, 14 Jun 2013 06:46:58 GMT</pubDate><guid isPermaLink="false">Reopened Issue: bug gcc 4.3.2 and 4.4.1 int64_t [8791] 20130614064658A</guid></item><item><title>Closed Issue: bug gcc 4.3.2 and 4.4.1 int64_t [8791]</title><link>http://safeint.codeplex.com/workitem/8791</link><description>i try to use multiply on int64_t&lt;br /&gt;&amp;#160;&lt;br /&gt;  boost&amp;#58;&amp;#58;int64_t a&amp;#61;2&amp;#59;&lt;br /&gt;  boost&amp;#58;&amp;#58;int64_t b&amp;#61;3&amp;#59;&lt;br /&gt;  boost&amp;#58;&amp;#58;int64_t c&amp;#59;&lt;br /&gt;  SafeMultiply&amp;#60;boost&amp;#58;&amp;#58;int64_t,boost&amp;#58;&amp;#58;int64_t&amp;#62;&amp;#40;a,b,c&amp;#41;&amp;#59;&lt;br /&gt;&amp;#160;&lt;br /&gt;gcc 4.3.2 and 4.4.1 takes compile time error&lt;br /&gt;&amp;#160;&lt;br /&gt;SafeInt3.hpp&amp;#58; In function &amp;#8216;bool SafeMultiply&amp;#40;T, U, T&amp;#38;&amp;#41; &amp;#91;with T &amp;#61; long int, U &amp;#61; long int&amp;#93;&amp;#8217;&amp;#58;&lt;br /&gt;test1.cpp&amp;#58;233&amp;#58;   instantiated from here&lt;br /&gt;SafeInt3.hpp&amp;#58;4995&amp;#58; error&amp;#58; incomplete type &amp;#8216;MultiplicationHelper&amp;#60;long int, long int, 11&amp;#62;&amp;#8217; used in nested name specifier&lt;br /&gt;</description><author>dcleblanc</author><pubDate>Thu, 16 May 2013 08:03:30 GMT</pubDate><guid isPermaLink="false">Closed Issue: bug gcc 4.3.2 and 4.4.1 int64_t [8791] 20130516080330A</guid></item><item><title>Updated Release: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792</link><description>&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;br /&gt;&lt;br /&gt;Very minor update from last night - added LL and ULL 3 places to remove a few warnings.&lt;br /&gt;&lt;br /&gt;12/18/12 - Updated to normalize whitespace. No functional changes.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Tue, 18 Dec 2012 22:48:48 GMT</pubDate><guid isPermaLink="false">Updated Release: SafeInt 3.0.17 (Sep 23, 2011) 20121218104848P</guid></item><item><title>Released: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792</link><description>
&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues
 reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;br&gt;
&lt;br&gt;
Very minor update from last night - added LL and ULL 3 places to remove a few warnings.&lt;br&gt;
&lt;br&gt;
12/18/12 - Updated to normalize whitespace. No functional changes.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
</description><author></author><pubDate>Tue, 18 Dec 2012 22:48:48 GMT</pubDate><guid isPermaLink="false">Released: SafeInt 3.0.17 (Sep 23, 2011) 20121218104848P</guid></item><item><title>Source code checked in, #96133</title><link>http://safeint.codeplex.com/SourceControl/changeset/changes/96133</link><description>Upgrade&amp;#58; New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link&amp;#58; http&amp;#58;&amp;#47;&amp;#47;go.microsoft.com&amp;#47;fwlink&amp;#47;&amp;#63;LinkId&amp;#61;254563</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 21:40:31 GMT</pubDate><guid isPermaLink="false">Source code checked in, #96133 20121001094031P</guid></item><item><title>Source code checked in, #96132</title><link>http://safeint.codeplex.com/SourceControl/changeset/changes/96132</link><description>Checked in by server upgrade</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 21:33:03 GMT</pubDate><guid isPermaLink="false">Source code checked in, #96132 20121001093303P</guid></item><item><title>Created Issue: nullptr and /CLR [15237]</title><link>http://safeint.codeplex.com/workitem/15237</link><description>Using Visual Studio 2008 , it is not possible to include the header in mixed CLR and native code because of the definition of nullptr clashes with CLR usage.&lt;br /&gt;&lt;br /&gt;Given there is only one use of nullptr in SafeInt3.hpp , defining nullptr seems to be a lot of trouble for dubious benefit.&lt;br /&gt;</description><author>KeithBurton</author><pubDate>Thu, 31 May 2012 06:58:46 GMT</pubDate><guid isPermaLink="false">Created Issue: nullptr and /CLR [15237] 20120531065846A</guid></item><item><title>Reviewed: SafeInt 3.0.17 (Sep 28, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792#ReviewBy-noloader</link><description>Rated 5 Stars &amp;#40;out of 5&amp;#41; - Great job on the latest SafeInt</description><author>noloader</author><pubDate>Thu, 29 Sep 2011 03:36:56 GMT</pubDate><guid isPermaLink="false">Reviewed: SafeInt 3.0.17 (Sep 28, 2011) 20110929033656A</guid></item><item><title>New Post: SafeInt at Boost?</title><link>http://safeint.codeplex.com/discussions/60193</link><description>&lt;div style="line-height: normal;"&gt;&lt;blockquote style="border: 0.1em solid #cccccc; font-style: italic; margin: 0.25em 1em 0pt; padding: 0pt 0.25em;"&gt;&lt;strong&gt;Timothy003 wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;p&gt;Boost has really smart people in its community, and sets ultra-high standards.&amp;nbsp; Libraries are peer-reviewed too, so you'd get a lot of good feedback on your code.&amp;nbsp; For example, I grabbed the latest SafeInt3.hpp, opened it up,&amp;nbsp;and immediately saw this:&lt;/p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;#&lt;span style="color: blue;"&gt;if&lt;/span&gt; !defined NULL
#define NULL ((&lt;span style="color: blue;"&gt;void&lt;/span&gt;*)0)
#endif
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: green;"&gt;// These two may not be defined, either&lt;/span&gt;
#&lt;span style="color: blue;"&gt;if&lt;/span&gt; !defined uintptr_t
#define uintptr_t size_t
#endif

#&lt;span style="color: blue;"&gt;if&lt;/span&gt; !defined intptr_t
#define intptr_t ptrdiff_t
#endif
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: green;"&gt;// Might need this for gcc and older Microsoft compilers&lt;/span&gt;
#&lt;span style="color: blue;"&gt;if&lt;/span&gt; !defined &lt;span style="color: blue;"&gt;nullptr&lt;/span&gt;
#define &lt;span style="color: blue;"&gt;nullptr&lt;/span&gt; NULL
#endif
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Code like that is evil.&amp;nbsp; The folks at Boost would surely&amp;nbsp;let you know about it, and you'll learn modern C++ programming paradigms, improving the quality of your code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;# Boost has really smart people in its community, and sets ultra-high standards.&lt;br /&gt;I'm not sure about the ultra high standards.&lt;/p&gt;
&lt;p&gt;# Libraries are peer-reviewed too, so you'd get a lot of good feedback on your code&lt;br /&gt;That&amp;nbsp; Boost will accept anything and hope that someone will [eventually] spot an error is a detriment, not a feature. For example, it appears Boost accepted threads and rolled them out without rigorous review or acceptance testing. Distributions generally don't backport bug fixes, so downlevel users are stuck with defective code.&lt;/p&gt;
&lt;p&gt;On my cursory review, Boost::Threads did not meet production quality (I filed about 15 bugs against it). For example, ignoring return values from WaitForSingleObject and pthread_mutex_lock was egregious. Its something I would expect from a self-taught K&amp;amp;R coder. I don't think a CompSci freshman would make the same mistakes. And I don't want code like that in my code base.&lt;/p&gt;
&lt;p&gt;It also appears Boost does not audit the bug database. To date, none of the bugs have even been acknowledged.&lt;/p&gt;
&lt;p&gt;# Code like that is evil.&lt;br /&gt;Have a look at Boost::Test and its use of macros sometime...&lt;/p&gt;&lt;/div&gt;</description><author>noloader</author><pubDate>Sun, 25 Sep 2011 21:57:01 GMT</pubDate><guid isPermaLink="false">New Post: SafeInt at Boost? 20110925095701P</guid></item><item><title>New Post: SafeInt at Boost?</title><link>http://safeint.codeplex.com/discussions/60193</link><description>&lt;div style="line-height: normal;"&gt;&lt;blockquote style="border: 0.1em solid #cccccc; font-style: italic; margin: 0.25em 1em 0pt; padding: 0pt 0.25em;"&gt;&lt;strong&gt;Timothy003 wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote style="padding: 0px 0.25em; font-style: italic; margin: 0.25em 1em 0px; border: 0.1em solid #cccccc;"&gt;&lt;strong&gt;noloader wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote style="padding: 0pt 0.25em; font-style: italic; margin: 0.25em 1em 0pt; border: 0.1em solid #cccccc;"&gt;&lt;strong&gt;Timothy003 wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;p&gt;.... In most cases, the overhead will be negligible.&amp;nbsp; Without solid profiling, I can't justify the security tradeoff.&amp;nbsp; But if you have proof that the vector has too much overhead, then of course you shouldn't use it.&amp;nbsp; Otherwise, it would be premature optimization.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Seriously? A program has to be correct before anything else.&lt;/p&gt;
&lt;p&gt;Out of curiosity, how can you be certain the attacker does not control the input?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt; Are you implying that dcleblanc's&amp;nbsp;code is safer and more correct?&amp;nbsp; Other than relying on undefined behavior with the type punning, there's already a bug in it; it doesn't validate the packet's size.&amp;nbsp; With vector, iterator debugging will give you a better chance  of catching incorrect code.&lt;/p&gt;
&lt;p&gt;The two examples don't do the same things, anyway.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;# Are you implying that dcleblanc's&amp;nbsp;code is safer and more correct?&lt;br /&gt; Yes, I believe LeBlanc's SafeInt code is safer in general.&lt;/p&gt;
&lt;p&gt;If the time ever comes, I believe ignoring wrap and overflow will be grossly negligent. The industry enjoys software patents, it should also enjoy liability.&lt;/p&gt;
&lt;p&gt;# Other than relying on undefined behavior with the type punning...&lt;br /&gt; My bad, I was commenting in general, not in the particular examples.&lt;/p&gt;
&lt;p&gt;For what its worth, the Visual Studio compiler is more tolerant of punning. I think VS just does the right thing and gets the alignments right (with no warning).&lt;/p&gt;
&lt;p&gt;# With vector, iterator debugging will give you a better chance of catching incorrect code.&lt;br /&gt; I love debug builds and asserts (I'm a student of John Robbins), but this is a problem in practice. To convince yourself, install libboost via apt-get or yum and define _GLIBCXX_DEBUG (http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html). I recently  [incorreclty] filed a report against Boost::Regex (it was an ABI problem).&lt;/p&gt;
&lt;p&gt;I know I could have built the source from scratch. But Boost has broken the tried and true configure/make/install in favor of something else buried in a spaghetti of documentation. I could be wrong, but I had no joy in building on Solaris (a Boost bug report  was filed, no acknowledgement to date).&lt;/p&gt;
&lt;p&gt;Jeff&lt;/p&gt;&lt;/div&gt;</description><author>noloader</author><pubDate>Sun, 25 Sep 2011 20:33:23 GMT</pubDate><guid isPermaLink="false">New Post: SafeInt at Boost? 20110925083323P</guid></item><item><title>New Post: SafeInt at Boost?</title><link>http://safeint.codeplex.com/discussions/60193</link><description>&lt;div style="line-height: normal;"&gt;&lt;blockquote style="padding-bottom: 0px; font-style: italic; margin: 0.25em 1em 0px; padding-left: 0.25em; padding-right: 0.25em; padding-top: 0px; border: #ccc 0.1em solid;"&gt;&lt;strong&gt;noloader wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote style="padding-bottom: 0pt; font-style: italic; margin: 0.25em 1em 0pt; padding-left: 0.25em; padding-right: 0.25em; padding-top: 0pt; border: #cccccc 0.1em solid;"&gt;&lt;strong&gt;Timothy003 wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;p&gt;.... In most cases, the overhead will be negligible.&amp;nbsp; Without solid profiling, I can't justify the security tradeoff.&amp;nbsp; But if you have proof that the vector has too much overhead, then of course you shouldn't use it.&amp;nbsp; Otherwise, it would be premature optimization.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Seriously? A program has to be correct before anything else.&lt;/p&gt;
&lt;p&gt;Out of curiosity, how can you be certain the attacker does not control the input?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;Are you implying that dcleblanc's&amp;nbsp;code is safer and more correct?&amp;nbsp; Other than relying on undefined behavior with the type punning, there's already a bug in it; it doesn't validate the packet's size.&amp;nbsp; With vector, iterator debugging will give you a better chance of catching incorrect code.&lt;/p&gt;
&lt;p&gt;The two examples don't do the same things, anyway.&lt;/p&gt;&lt;/div&gt;</description><author>Timothy003</author><pubDate>Sat, 24 Sep 2011 20:44:51 GMT</pubDate><guid isPermaLink="false">New Post: SafeInt at Boost? 20110924084451P</guid></item><item><title>New Post: SafeInt at Boost?</title><link>http://safeint.codeplex.com/discussions/60193</link><description>&lt;div style="line-height: normal;"&gt;&lt;blockquote style="border: 0.1em solid #cccccc; font-style: italic; margin: 0.25em 1em 0pt; padding: 0pt 0.25em;"&gt;&lt;strong&gt;Timothy003 wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;p&gt;.... In most cases, the overhead will be negligible.&amp;nbsp; Without solid profiling, I can't justify the security tradeoff.&amp;nbsp; But if you have proof that the vector has too much overhead, then of course you shouldn't  use it.&amp;nbsp; Otherwise, it would be premature optimization.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Seriously? A program has to be correct before anything else.&lt;/p&gt;
&lt;p&gt;Out of curiosity, how can you be certain the attacker does not control the input?&lt;/p&gt;&lt;/div&gt;</description><author>noloader</author><pubDate>Sat, 24 Sep 2011 20:28:56 GMT</pubDate><guid isPermaLink="false">New Post: SafeInt at Boost? 20110924082856P</guid></item><item><title>Updated Release: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792</link><description>&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;br /&gt;&lt;br /&gt;Very minor update from last night - added LL and ULL 3 places to remove a few warnings.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 23 Sep 2011 17:25:15 GMT</pubDate><guid isPermaLink="false">Updated Release: SafeInt 3.0.17 (Sep 23, 2011) 20110923052515P</guid></item><item><title>Released: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792</link><description>
&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues
 reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;br&gt;
&lt;br&gt;
Very minor update from last night - added LL and ULL 3 places to remove a few warnings.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
</description><author></author><pubDate>Fri, 23 Sep 2011 17:25:15 GMT</pubDate><guid isPermaLink="false">Released: SafeInt 3.0.17 (Sep 23, 2011) 20110923052515P</guid></item><item><title>Updated Release: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792</link><description>&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;br /&gt;&lt;br /&gt;Very minor update from last night - added LL and ULL 3 places to remove a few warnings.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 23 Sep 2011 14:33:25 GMT</pubDate><guid isPermaLink="false">Updated Release: SafeInt 3.0.17 (Sep 23, 2011) 20110923023325P</guid></item><item><title>Released: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792</link><description>
&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues
 reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;br&gt;
&lt;br&gt;
Very minor update from last night - added LL and ULL 3 places to remove a few warnings.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
</description><author></author><pubDate>Fri, 23 Sep 2011 14:33:25 GMT</pubDate><guid isPermaLink="false">Released: SafeInt 3.0.17 (Sep 23, 2011) 20110923023325P</guid></item><item><title>Commented Issue: integer overflows [14278]</title><link>http://safeint.codeplex.com/workitem/14278</link><description>I&amp;#39;ve been tracking down some integer overflows in Firefox and seem to have narrowed some of them down to the SafeInt library.&lt;br /&gt;&lt;br /&gt;As an example, the &amp;#34;a &amp;#61; -a&amp;#59;&amp;#34; assignment at SafeInt3.hpp&amp;#58;2102 is sometimes invoked while a has value INT_MIN.  Of course, negating INT_MIN is undefined behavior in C&amp;#43;&amp;#43;98 and C&amp;#43;&amp;#43;11.  &lt;br /&gt;&lt;br /&gt;To reproduce, change the code like this&amp;#58;&lt;br /&gt;&lt;br /&gt;       if&amp;#40; a &amp;#60; 0 &amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;&amp;#9;  if &amp;#40;a&amp;#61;&amp;#61;INT_MIN&amp;#41; printf &amp;#40;&amp;#34;oops&amp;#33;&amp;#92;n&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;           a &amp;#61; -a&amp;#59;&lt;br /&gt;           fIsNegative &amp;#61; true&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;Then run MultVerify&amp;#40;&amp;#41;.  Here is what I get&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#91;regehr&amp;#64;gamow safeint&amp;#93;&amp;#36; g&amp;#43;&amp;#43; -O -w TestMain.cpp MultVerify.cpp  -o TestMain&lt;br /&gt;&amp;#91;regehr&amp;#64;gamow safeint&amp;#93;&amp;#36; .&amp;#47;TestMain&lt;br /&gt;oops&amp;#33;&lt;br /&gt;oops&amp;#33;&lt;br /&gt;oops&amp;#33;&lt;br /&gt;oops&amp;#33;&lt;br /&gt;oops&amp;#33;&lt;br /&gt;oops&amp;#33;&lt;br /&gt;&lt;br /&gt;This is 3.0.16p. There are some other overflows in SafeInt, please let me know if you are interested in bug reports about them.&lt;br /&gt;Comments: ** Comment from web user: dcleblanc ** &lt;p&gt;This issue should be addressed by the 3.0.17 release. Note to consumers - 3.0.17 is still considered a beta. It is strongly recommended that if you are using a compiler which aggressively optimizes that you also enable &amp;#40;and pay attention to&amp;#41; the warnings that it is removing code.&lt;/p&gt;</description><author>dcleblanc</author><pubDate>Fri, 23 Sep 2011 07:14:27 GMT</pubDate><guid isPermaLink="false">Commented Issue: integer overflows [14278] 20110923071427A</guid></item><item><title>Created Release: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases?ReleaseId=73792</link><description>&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 23 Sep 2011 07:12:09 GMT</pubDate><guid isPermaLink="false">Created Release: SafeInt 3.0.17 (Sep 23, 2011) 20110923071209A</guid></item><item><title>Released: SafeInt 3.0.17 (Sep 23, 2011)</title><link>http://safeint.codeplex.com/releases/view/73792</link><description>
&lt;div class="wikidoc"&gt;See home page for extended comments on differences between 3.0.17 and 3.0.16. This release passes all the internal verification tests, but has not yet been validated against all of the compilers we support. It does address the issues
 reported by John Regehr as of today. Once it has been verified against all of the compilers, and has been verified not to emit more warnings, we&amp;#39;ll move it to stable.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
</description><author></author><pubDate>Fri, 23 Sep 2011 07:12:09 GMT</pubDate><guid isPermaLink="false">Released: SafeInt 3.0.17 (Sep 23, 2011) 20110923071209A</guid></item><item><title>Updated Wiki: Home</title><link>http://safeint.codeplex.com/wikipage?version=13</link><description>&lt;div class="wikidoc"&gt;SafeInt is a C++ header containing the SafeInt class, non-throwing functions to check common operations, and the associated internal mechanisms.&lt;br /&gt;&lt;br /&gt;SafeInt is currently used extensively throughout Microsoft, with substantial adoption within Office and Windows. If you are compiling for the Microsoft compiler only, a very similar version is now available with Visual Studio 2010.&lt;br /&gt;&lt;br /&gt;It can be used with any compiler that has good template support, and is known to work on Visual Studio 7.1 or later.&lt;br /&gt;&lt;br /&gt;Thanks to help from Jeffrey Walton of the OWASP project, we now have a very complete runtime test harness. There&amp;#39;s still a couple of files to get posted, but the files we have on the download section contain most of the new work. To avoid confusion, the test harness is now a different release than the main header.&lt;br /&gt;&lt;br /&gt;Also thanks to Jeffrey, we have extended the list of compilers that are supported to:&lt;br /&gt;&lt;br /&gt;Microsoft Visual Studio, version 7.1 through the latest.&lt;br /&gt;Reasonably new versions of gcc, including the latest version that will compile for Apple platforms.&lt;br /&gt;The Intel compiler, with some caveats - it doesn&amp;#39;t support some of the friend overloads, but does work properly with the runtime checks.&lt;br /&gt;Clang is also now supported.&lt;br /&gt;&lt;br /&gt;The most recent version is 3.0.17. The main change between minor versions 15 and 16 is that the Intel compiler will quite vigorously optimize away some of the signed addition overflow checks. Changes have been made such that intermediate calculations are done with unsigned numbers, and unsigned overflow is defined by the standard, which means the Intel compiler won&amp;#39;t optimize them away. There have been instances of the gcc compiler doing the same thing, but this hasn&amp;#39;t been demonstrated in SafeInt. As of this version, there won&amp;#39;t be a possibility of the compiler actually removing checks.&lt;br /&gt;&lt;br /&gt;Thanks to John Regehr of the University of Utah for noticing that the compiler may also become aggressive about removing things when you attempt to perform a unary negation on a signed number, and that signed number is a compile-time constant with a value of MIN_INT. I personally have a low opinion of compilers doing this sort of thing - seems like there&amp;#39;s an awful lot of code out there with some extremely subtle bugs when compiled with these compilers. Compiler warnings are your friend, and it seems like the more compilers you have, the better your coverage. As it turns out, Clang will warn about when this might happen, which enabled a more comprehensive scrub of the code than we were able to do in 3.0.16.&lt;br /&gt;&lt;br /&gt;The fix for this particular issue is to go ahead and code in a dependency on 2&amp;#39;s complement representation of negative numbers - the compiler may remove -x, but it won&amp;#39;t remove ~(unsigned)x + 1, which emits the same bit pattern (and the same assembly code).&lt;br /&gt;&lt;br /&gt;Important note - the runtime test harness does catch it when the compiler optimizes away tests. You should compile and run the runtime checks to verify that everything is working properly with your compiler. Note - as of 3.0.17, we have some work to do to update the runtime tests to account for compile-time constants. We&amp;#39;ll get this updated as soon as practical.&lt;br /&gt;&lt;br /&gt;In addition, SafeInt now compiles warning-free with all warnings enabled on both latest gcc and the Microsoft compiler. It will still emit a few warnings with the Intel compiler.&lt;br /&gt;&lt;br /&gt;Known outstanding work - I have yet to do the work to correctly annotate the class with throw() in the case of an error handler that does something other than C++ exceptions (structured exceptions, terminate the app, etc).&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 23 Sep 2011 07:08:16 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20110923070816A</guid></item></channel></rss>