OSDN Git Service

[DebugInfo] Replace unreachable with None
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 12 Mar 2018 14:45:08 +0000 (14:45 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 12 Mar 2018 14:45:08 +0000 (14:45 +0000)
Invalid user input should not trigger assertions and unreachables. We
already return an Option so we should just return None here.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327274 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFFormValue.cpp

index 3066c37..ff3f880 100644 (file)
@@ -161,7 +161,7 @@ DWARFFormValue::getFixedByteSize(dwarf::Form Form,
     return 0;
 
   default:
-    llvm_unreachable("Handle this form in this switch statement");
+    break;
   }
   return None;
 }