Added unit-test.
Fixed behavior of max_len argument.
Call read syscall with all available buffer, not just a page.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
compiler-rt/lib/sanitizer_common/sanitizer_common.h | ||
---|---|---|
647 ↗ | (On Diff #145835) | Why is it implemented this way rather than copying over the bytes that have already been read? |
compiler-rt/lib/sanitizer_common/sanitizer_file.cc | ||
97 ↗ | (On Diff #146060) | This function looks much better than before, but since we're already modifying this maybe it would make sense to copy data over to the new mmapped region rather than rereading it. |
Comment Actions
Just found https://github.com/google/sanitizers/issues/435 and https://chromiumcodereview.appspot.com/18661009.
Maybe it would make sense to write a separate function for reading procmaps.
Comment Actions
That's the plan.
I'll switch all non-procmaps callers to ReadFileToVector and then rename/hide ReadFileToBuffer to something procmaps specific.