This is an archive of the discontinued LLVM Phabricator instance.

[lld] Fix heap-buffer-overflow bugs identified by the Address Sanitizer
ClosedPublic

Authored by garious on Feb 18 2015, 12:35 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

garious updated this revision to Diff 20212.Feb 18 2015, 12:35 PM
garious retitled this revision from to [lld] Fix heap-buffer-overflow bugs identified by the Address Sanitizer.
garious updated this object.
garious edited the test plan for this revision. (Show Details)
garious added reviewers: t.p.northover, nicholas.
garious set the repository for this revision to rL LLVM.
garious added a project: lld.
garious added a subscriber: Unknown Object (MLST).

It needs a testcase.

lib/ReaderWriter/MachO/ArchHandler.cpp
145 ↗(On Diff #20212)

You don't need the '{'

lib/ReaderWriter/MachO/CompactUnwindPass.cpp
414 ↗(On Diff #20212)

Use an early return maybe?

I just saw the comment about an existing test failing with asan. No need to add another one.

garious updated this revision to Diff 20227.Feb 18 2015, 3:26 PM

Cleanup, per Rafael's feedback.

kcc added a subscriber: kcc.Feb 18 2015, 5:41 PM

I just saw the comment about an existing test failing with asan. No need to add another one.

Are we running that test on the bot(s)?

To my knowledge, there isn't an ASan bot for LLD.

rafael accepted this revision.Feb 19 2015, 7:30 AM
rafael added a reviewer: rafael.

Simple enough.

This revision is now accepted and ready to land.Feb 19 2015, 7:30 AM
kcc added a comment.Feb 19 2015, 11:17 AM

To my knowledge, there isn't an ASan bot for LLD.

Would you like to add lld testing to http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/?
If yes, change zorg/buildbot/builders/sanitizers/buildbot_fast.sh and send review to Sergey Matveev <earthdok@google.com>

This revision was automatically updated to reflect the committed changes.

@kcc, I'll see what I can do. Let's continue this discussion on llvmdev. LLD is now free of ASan errors, but I haven't yet had a chance to evaluate MSan. By the looks of those scripts, I should probably fix up any MSan-reported bugs before lighting up that bot.