Index: sandbox/linux/seccomp-bpf/syscall_iterator.cc |
diff --git a/sandbox/linux/seccomp-bpf/syscall_iterator.cc b/sandbox/linux/seccomp-bpf/syscall_iterator.cc |
index 89cc1cb473cc911cd0c1254129624f13d422174c..3e624fc4115155fbfda676bf982ab600714d28e2 100644 |
--- a/sandbox/linux/seccomp-bpf/syscall_iterator.cc |
+++ b/sandbox/linux/seccomp-bpf/syscall_iterator.cc |
@@ -16,9 +16,15 @@ uint32_t SyscallIterator::Next() { |
uint32_t val; |
do { |
+#if defined(__mips__) && (_MIPS_SIM == _MIPS_SIM_ABI32) |
+ // |num_| has been initialized to 4000, which we assume is also MIN_SYSCALL. |
+ // This is true for Mips O32 ABI. |
+ COMPILE_ASSERT(MIN_SYSCALL == __NR_Linux, min_syscall_should_be_4000); |
jln (very slow on Chromium)
2014/05/02 20:42:04
The syscall iterator should always start at 0, thi
nedeljko
2014/05/07 15:40:05
I initialized num_ to 0 in constructor in new patc
|
+#else |
// |num_| has been initialized to 0, which we assume is also MIN_SYSCALL. |
// This true for supported architectures (Intel and ARM EABI). |
COMPILE_ASSERT(MIN_SYSCALL == 0u, min_syscall_should_always_be_zero); |
+#endif |
val = num_; |
// First we iterate up to MAX_PUBLIC_SYSCALL, which is equal to MAX_SYSCALL |