summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--NEWS3
-rw-r--r--src/lib/eina/eina_mmap.c11
3 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f5fb49f17..0cfd515511 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12012-09-27 Carsten Haitzler (The Rasterman)
2
3 * Fix return value of eina_mmap_safety_enabled_set() and
4 ensure future eina_mmap_safety_enabled_get() return right value
5 on success.
6
12012-09-21 Carsten Haitzler (The Rasterman) 72012-09-21 Carsten Haitzler (The Rasterman)
2 8
3 * Fix big endian bug with eet image handling and endianess swapping. 9 * Fix big endian bug with eet image handling and endianess swapping.
diff --git a/NEWS b/NEWS
index 13fa7d056e..6ae1c9cc50 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ EFL 1.8.0
3========= 3=========
4 4
5Changes since 1.7.0: 5Changes since 1.7.0:
6--------------------
6 7
7Additions: 8Additions:
8 * Add DOCTYPE children parsing in eina_simple_xml 9 * Add DOCTYPE children parsing in eina_simple_xml
@@ -14,3 +15,5 @@ Improvements:
14 15
15Fixes: 16Fixes:
16 * Fix PPC (big endian) image codec bug. 17 * Fix PPC (big endian) image codec bug.
18 * Fix return value of eina_mmap_safety_enabled_set() and future
19 eina_mmap_safety_enabled_get() returns after success
diff --git a/src/lib/eina/eina_mmap.c b/src/lib/eina/eina_mmap.c
index b99a542939..90809a23bb 100644
--- a/src/lib/eina/eina_mmap.c
+++ b/src/lib/eina/eina_mmap.c
@@ -164,10 +164,7 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
164 sa.sa_sigaction = _eina_mmap_safe_sigbus; 164 sa.sa_sigaction = _eina_mmap_safe_sigbus;
165 sa.sa_flags = SA_RESTART | SA_SIGINFO; 165 sa.sa_flags = SA_RESTART | SA_SIGINFO;
166 sigemptyset(&sa.sa_mask); 166 sigemptyset(&sa.sa_mask);
167 /* FIXME: This is rubbish. We return EINA_FALSE whether sigaction 167 if (sigaction(SIGBUS, &sa, NULL) == 0) goto done;
168 * fails or not. And we never set mmap_safe, so we always hit this
169 * code path. */
170 if (sigaction(SIGBUS, &sa, NULL) == 0) return EINA_FALSE;
171 /* setup of SIGBUS handler failed, lets close zero page dev and fail */ 168 /* setup of SIGBUS handler failed, lets close zero page dev and fail */
172 close(_eina_mmap_zero_fd); 169 close(_eina_mmap_zero_fd);
173 _eina_mmap_zero_fd = -1; 170 _eina_mmap_zero_fd = -1;
@@ -176,8 +173,14 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
176 else 173 else
177 { 174 {
178 /* reset signal handler to default for SIGBUS */ 175 /* reset signal handler to default for SIGBUS */
176 if (_eina_mmap_zero_fd >= 0)
177 {
178 close(_eina_mmap_zero_fd);
179 _eina_mmap_zero_fd = -1;
180 }
179 signal(SIGBUS, SIG_DFL); 181 signal(SIGBUS, SIG_DFL);
180 } 182 }
183done:
181 mmap_safe = enabled; 184 mmap_safe = enabled;
182 return mmap_safe; 185 return mmap_safe;
183#endif 186#endif