[PATCH] D34752: [LLD][ELF] Fix nullptr dereference when creating an error message.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 12:09:16 PDT 2017


Sean Eveson via Phabricator <reviews at reviews.llvm.org> writes:

> seaneveson updated this revision to Diff 104642.
> seaneveson added a comment.
>
> Changed to early return as requested.
>
> I haven't been able to find a way to test this, as the crash only occurs for errors in internal sections and I can't find a good way to force one. Do you have any ideas?

The two cases I can think of that would trigger this are:

* A synthetic section has a bad relocation, like an undefined
  reference.
* A synthetic section defines a symbol that conflicts with an user
  defined one.

Can you share what change you have that was hitting this?

(The patch looks good to me anyway).

Cheers,
Rafael


More information about the llvm-commits mailing list