This is an archive of the discontinued LLVM Phabricator instance.

[asan] Don't print rows of shadow bytes outside shadow memory
ClosedPublic

Authored by rnk on Oct 24 2017, 2:32 PM.

Details

Summary

They might not be mapped on some platforms such as Win64. In
particular, this happens if the user address is null. There will not be
any shadow memory 5*16 bytes before the user address.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Oct 24 2017, 2:32 PM
rnk updated this revision to Diff 120139.Oct 24 2017, 2:33 PM
  • longer name
  • format
vitalybuka added inline comments.Oct 24 2017, 3:05 PM
compiler-rt/lib/asan/asan_errors.cc
429 ↗(On Diff #120139)

What do users see now, without your patch?

rnk added inline comments.Oct 24 2017, 3:26 PM
compiler-rt/lib/asan/asan_errors.cc
429 ↗(On Diff #120139)

A crash, the shadow below is unmapped.

vitalybuka accepted this revision.Oct 24 2017, 5:19 PM
vitalybuka added inline comments.
compiler-rt/lib/asan/asan_errors.cc
429 ↗(On Diff #120139)

Maybe some placeholder would be nice, to show that shadow is missing.
Still it's improvement as is.

This revision is now accepted and ready to land.Oct 24 2017, 5:19 PM
This revision was automatically updated to reflect the committed changes.