Bug 874148 - crash in libxul.so!mozilla::hal_impl::GonkDiskSpaceWatcher::OnFileCanReadWithoutBlocking [GonkDiskSpaceWatcher.cpp : 238 + 0x4]. r=fabrice

This commit is contained in:
Fernando Jiménez 2013-05-27 18:35:27 +02:00
parent 61d0e165d3
commit 80a2a84f6f

View File

@ -232,8 +232,13 @@ GonkDiskSpaceWatcher::OnFileCanReadWithoutBlocking(int aFd)
len = read(aFd, buf, sizeof(buf));
} while(len == -1 && errno == EINTR);
// Bail out if the file is busy.
if (len < 0 && errno == ETXTBSY) {
return;
}
// We should get an exact multiple of fanotify_event_metadata
if (len <= 0 || (len % sizeof(*fem) != 0)) {
if (len <= 0 || (len % FAN_EVENT_METADATA_LEN != 0)) {
printf_stderr("About to crash: fanotify_event_metadata read error.");
MOZ_CRASH();
}