Refs #85 #104. Disable my_bind to fix this segfault issue.

This commit is contained in:
Xianyi Zhang 2012-05-07 16:38:44 +08:00
parent 7f89edee3e
commit e7846547be
1 changed files with 2 additions and 2 deletions

View File

@ -11,14 +11,14 @@ diff --git a/common_linux.h b/common_linux.h
index b0381d9..40a94cb 100644 index b0381d9..40a94cb 100644
--- a/common_linux.h --- a/common_linux.h
+++ b/common_linux.h +++ b/common_linux.h
@@ -76,8 +76,8 @@ static inline int my_mbind(void *addr, unsigned long len, int mode, @@ -76,9 +76,8 @@ static inline int my_mbind(void *addr, unsigned long len, int mode,
#endif #endif
#else #else
//Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34 //Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34
-// unsigned long null_nodemask=0; -// unsigned long null_nodemask=0;
- return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags); - return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
+ unsigned long null_nodemask=0; + unsigned long null_nodemask=0;
+ return syscall(SYS_mbind, addr, len, mode, &nodemask, maxnode, flags); + return 0;
#endif #endif
} }