Added unit-test.
Fixed behavior of max_len argument.
Call read syscall with all available buffer, not just a page.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 18961 Build 18961: arc lint + arc unit
Event Timeline
compiler-rt/lib/sanitizer_common/sanitizer_common.h | ||
---|---|---|
648 | 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–98 | 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. |
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.
That's the plan.
I'll switch all non-procmaps callers to ReadFileToVector and then rename/hide ReadFileToBuffer to something procmaps specific.
Why is it implemented this way rather than copying over the bytes that have already been read?