| Index: base/pickle.cc
|
| diff --git a/base/pickle.cc b/base/pickle.cc
|
| index a9e9a0fdfbcb623c721082d9273fc2e10b2dd259..2d7a051b20077e20d86346867f414cb3ab961ea6 100644
|
| --- a/base/pickle.cc
|
| +++ b/base/pickle.cc
|
| @@ -118,6 +118,18 @@ bool PickleIterator::ReadFloat(float* result) {
|
| return true;
|
| }
|
|
|
| +bool PickleIterator::ReadDouble(double* result) {
|
| + // crbug.com/315213
|
| + // The source data may not be properly aligned, and unaligned double reads
|
| + // cause SIGBUS on some ARM platforms, so force using memcpy to copy the data
|
| + // into the result.
|
| + const char* read_from = GetReadPointerAndAdvance<double>();
|
| + if (!read_from)
|
| + return false;
|
| + memcpy(result, read_from, sizeof(*result));
|
| + return true;
|
| +}
|
| +
|
| bool PickleIterator::ReadString(std::string* result) {
|
| int len;
|
| if (!ReadInt(&len))
|
|
|