Skip to content

Commit

Permalink
JSBigString to MAP_PRIVATE not MAP_SHARED
Browse files Browse the repository at this point in the history
Reviewed By: mhorowitz

Differential Revision: D6613463

fbshipit-source-id: 2553a0475ade061f3b70ffce90fcf4e0ceb7d9fa
  • Loading branch information
Peter Ammon authored and facebook-github-bot committed Dec 20, 2017
1 parent 9b147a5 commit f9f40cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ReactCommon/cxxreact/JSBigString.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ class RN_EXPORT JSBigFileString : public JSBigString {

const char *c_str() const override {
if (!m_data) {
m_data = (const char *)mmap(0, m_size, PROT_READ, MAP_SHARED, m_fd, m_mapOff);
m_data =
(const char *)mmap(0, m_size, PROT_READ, MAP_PRIVATE, m_fd, m_mapOff);
CHECK(m_data != MAP_FAILED)
<< " fd: " << m_fd
<< " size: " << m_size
Expand Down

0 comments on commit f9f40cd

Please sign in to comment.