[Lldb-commits] [lldb] r180235 - Don't crash if we try to interpret the IR (incorrectly in this case) and can't handle the size. This came from trying to do:

Greg Clayton gclayton at apple.com
Wed Apr 24 17:57:06 PDT 2013


Author: gclayton
Date: Wed Apr 24 19:57:05 2013
New Revision: 180235

URL: http://llvm.org/viewvc/llvm-project?rev=180235&view=rev
Log:
Don't crash if we try to interpret the IR (incorrectly in this case) and can't handle the size. This came from trying to do:

(lldb) p typedef float __attribute__((ext_vector_type(8))) __ext_vector_float8; (__ext_vector_float8)$ymm0


Modified:
    lldb/trunk/source/Expression/IRInterpreter.cpp

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=180235&r1=180234&r2=180235&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Wed Apr 24 19:57:05 2013
@@ -209,9 +209,11 @@ public:
                 return false;
             
             lldb::offset_t offset = 0;
-            uint64_t u64value = value_extractor.GetMaxU64(&offset, value_size);
-                    
-            return AssignToMatchType(scalar, u64value, value->getType());
+            if (value_size <= 8)
+            {
+                uint64_t u64value = value_extractor.GetMaxU64(&offset, value_size);
+                return AssignToMatchType(scalar, u64value, value->getType());
+            }
         }
         
         return false;





More information about the lldb-commits mailing list