[llvm] r327274 - [DebugInfo] Replace unreachable with None

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 10:59:00 PDT 2018


Test case?

On Mon, Mar 12, 2018 at 7:47 AM Jonas Devlieghere via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: jdevlieghere
> Date: Mon Mar 12 07:45:08 2018
> New Revision: 327274
>
> URL: http://llvm.org/viewvc/llvm-project?rev=327274&view=rev
> Log:
> [DebugInfo] Replace unreachable with None
>
> 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
>
> Modified:
>     llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
>
> Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp?rev=327274&r1=327273&r2=327274&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp (original)
> +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp Mon Mar 12 07:45:08
> 2018
> @@ -161,7 +161,7 @@ DWARFFormValue::getFixedByteSize(dwarf::
>      return 0;
>
>    default:
> -    llvm_unreachable("Handle this form in this switch statement");
> +    break;
>    }
>    return None;
>  }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180312/87dc3a38/attachment.html>


More information about the llvm-commits mailing list