[test-suite] r343186 - Fix UB (signed int overflow) in Bullet. The change is the same as already present in Bullet mainline.

Anton Korobeynikov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 02:08:42 PDT 2018


Author: asl
Date: Thu Sep 27 02:08:42 2018
New Revision: 343186

URL: http://llvm.org/viewvc/llvm-project?rev=343186&view=rev
Log:
Fix UB (signed int overflow) in Bullet. The change is the same as already present in Bullet mainline.

Modified:
    test-suite/trunk/MultiSource/Benchmarks/Bullet/include/LinearMath/btHashMap.h

Modified: test-suite/trunk/MultiSource/Benchmarks/Bullet/include/LinearMath/btHashMap.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Bullet/include/LinearMath/btHashMap.h?rev=343186&r1=343185&r2=343186&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Bullet/include/LinearMath/btHashMap.h (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Bullet/include/LinearMath/btHashMap.h Thu Sep 27 02:08:42 2018
@@ -81,7 +81,7 @@ public:
 	//to our success
 	SIMD_FORCE_INLINE	unsigned int getHash()const
 	{
-		int key = m_uid;
+		unsigned int key = m_uid;
 		// Thomas Wang's hash
 		key += ~(key << 15);
 		key ^=  (key >> 10);
@@ -120,7 +120,7 @@ public:
 	//to our success
 	SIMD_FORCE_INLINE	unsigned int getHash()const
 	{
-		int key = m_uid;
+		unsigned int key = m_uid;
 		// Thomas Wang's hash
 		key += ~(key << 15);
 		key ^=  (key >> 10);




More information about the llvm-commits mailing list