This change supresses couple of checks related to shared memory to
avoid crashes during app exit scenario and adds logs for the same.
Reference: https://review.tizen.org/gerrit/282461
Change-Id: I1466ec87f91b76fe6989a1d40c17e4cf5f496ab5
Signed-off-by: Bakka Uday Kiran <b.kiran@samsung.com>
#include "base/posix/eintr_wrapper.h"
#endif
+#if BUILDFLAG(IS_TIZEN)
+#include "base/logging.h"
+#endif
+
namespace base {
namespace internal {
ret = 0;
#endif
+#if BUILDFLAG(IS_TIZEN)
+ if (0 != ret)
+ LOG(ERROR) << "Failed to close file descriptor! fd=" << fd;
+#else
PCHECK(0 == ret);
+#endif
}
#endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
if (size > static_cast<size_t>(std::numeric_limits<int>::max()))
return {};
+#if BUILDFLAG(IS_TIZEN)
+ if (!CheckPlatformHandlePermissionsCorrespondToMode(handle.get(), mode,
+ size)) {
+ LOG(ERROR) << "CheckPlatformHandlePermissionsCorrespondToMode failed"
+ << ", fd: " << handle.get().fd
+ << ", readonly_fd: " << handle.get().readonly_fd
+ << ", mode: " << (int)mode << ", size: " << size
+ << ", guid: " << guid;
+ return {};
+ }
+#else
CHECK(
CheckPlatformHandlePermissionsCorrespondToMode(handle.get(), mode, size));
+#endif
switch (mode) {
case Mode::kReadOnly: