This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - fix possible UB when dereferencing null
ClosedPublic

Authored by grimar on Jan 22 2016, 7:44 AM.

Details

Summary

In InputSection.cpp it was possible to dereference null.
Had to change signature of relocateTlsOptimize to accept pointer instead of reference.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 45688.Jan 22 2016, 7:44 AM
grimar retitled this revision from to [ELF] - fix possible UB when dereferencing null.
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
grimar added inline comments.
ELF/InputSection.cpp
174 ↗(On Diff #45688)

Thats the place. Having nullptr is ok here.

ruiu accepted this revision.Jan 22 2016, 8:36 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 22 2016, 8:36 AM
This revision was automatically updated to reflect the committed changes.