[PATCH] D30188: [ELF] - Do not segfault when using --gc-sections with linker script
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 08:01:44 PST 2017
James Henderson via Phabricator <reviews at reviews.llvm.org> writes:
> jhenderson added a comment.
>
> I'm not yet familiar enough with LLD to know the policy with asserts, but would it make sense to assert after that if statement (possibly inside switchTo()) to check that IB->OutSec is not null? That way if there are any other cases either currently or in the future where OutSec is null we'll get a nicer failure, at least in Debug builds.
When a value is to be accessed immediately, a segmentation fault on a
null pointer is as good for debugging as an assertion failure, no?
Cheers,
Rafael
More information about the llvm-commits
mailing list