diff options
author | Ashok Thirumurthi <ashok.thirumurthi@intel.com> | 2013-04-19 15:58:38 +0000 |
---|---|---|
committer | Ashok Thirumurthi <ashok.thirumurthi@intel.com> | 2013-04-19 15:58:38 +0000 |
commit | 6ac9d13e610dc9005660594ee4325483d2c97fb4 (patch) | |
tree | a050c62e9b6984f4b8322d8ea11c0900fd966dce /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | cc541e80036d0d2c20cd68d381b2cd424d07f6ae (diff) | |
download | bcm5719-llvm-6ac9d13e610dc9005660594ee4325483d2c97fb4.tar.gz bcm5719-llvm-6ac9d13e610dc9005660594ee4325483d2c97fb4.zip |
Provided a variant of ReadCStringFromMemory that supports null terminators of any character width.
This prevents unbounded reads (i.e. reads of GetMaximumSizeOfStringSummary() bytes)
from causing test failures (i.e. due to ptrace EIO or EFAULT on Linux).
Note that ReadCStringFromMemory is marked as deprecated because the loop that calls
ReadMemory does not continue until the string has been completely read.
The expected behavior is to read until until max_bytes or a null terminator.
Note: As discussed on lldb-dev, further testing will be performed with ReadStringFromMemory
before further changes are made for users of ReadCStringFromMemory.
Thanks to Enrico, Matt and Andy for their review feedback.
llvm-svn: 179857
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions