mips: null pointer deref should segfault
authorWesley W. Terpstra <terpstra@debian.org>
Tue, 12 Jul 2011 11:34:23 +0000 (14:34 +0300)
committerRiku Voipio <riku.voipio@linaro.org>
Tue, 12 Jul 2011 11:34:23 +0000 (14:34 +0300)
Dereferencing a null pointer causes an exception 0xC (EXCP_AdEL)
instead of EXCP_TLBL. This should also trigger a segfault.

Signed-off-by: Wesley W. Terpstra <terpstra@debian.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/main.c

index e32f9877868f79cf2f5f5dc0dd82b34afa67bf6a..2135b9c714014bfe7d37efeace1896b92567607e 100644 (file)
@@ -2120,6 +2120,8 @@ void cpu_loop(CPUMIPSState *env)
             break;
         case EXCP_TLBL:
         case EXCP_TLBS:
+        case EXCP_AdEL:
+        case EXCP_AdES:
             info.si_signo = TARGET_SIGSEGV;
             info.si_errno = 0;
             /* XXX: check env->error_code */