[llvm] eb61ab1 - Fix a copy and paste error that would cause a crash.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 12:50:05 PDT 2020


Does this have test coverage?

On Fri, Mar 6, 2020 at 6:07 PM Greg Clayton via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Greg Clayton
> Date: 2020-03-06T18:07:36-08:00
> New Revision: eb61ab1bd9af607fc7439edd3b92467b78772b92
>
> URL:
> https://github.com/llvm/llvm-project/commit/eb61ab1bd9af607fc7439edd3b92467b78772b92
> DIFF:
> https://github.com/llvm/llvm-project/commit/eb61ab1bd9af607fc7439edd3b92467b78772b92.diff
>
> LOG: Fix a copy and paste error that would cause a crash.
>
> Summary: The wrong variable was being checked for an error, which mean a
> llvm::Error went unchecked and crashes dsymutil. Discovered this when
> trying to feed an ELF file to "dsymutil --update" and running into the
> crash.
>
> Reviewers: aprantl, JDevlieghere
>
> Subscribers: llvm-commits
>
> Tags: #llvm
>
> Differential Revision: https://reviews.llvm.org/D75777
>
> Added:
>
>
> Modified:
>     llvm/tools/dsymutil/MachODebugMapParser.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp
> b/llvm/tools/dsymutil/MachODebugMapParser.cpp
> index 83703fb13f0a..a9d6c876860c 100644
> --- a/llvm/tools/dsymutil/MachODebugMapParser.cpp
> +++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp
> @@ -383,7 +383,7 @@ ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
> MachODebugMapParser::parse() {
>
>    auto Objects = ObjectEntry->getObjectsAs<MachOObjectFile>();
>    if (!Objects) {
> -    return errorToErrorCode(ObjectEntry.takeError());
> +    return errorToErrorCode(Objects.takeError());
>    }
>
>    std::vector<std::unique_ptr<DebugMap>> Results;
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://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/20200325/76a934b9/attachment.html>


More information about the llvm-commits mailing list