Skip to content

Commit

Permalink
mips: null pointer deref should segfault
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
  • Loading branch information
Wesley W. Terpstra authored and Riku Voipio committed Jul 12, 2011
1 parent 7c2f615 commit e6e5bd2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions linux-user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e6e5bd2

Please sign in to comment.