ARM: fix segfault
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 8 Oct 2011 10:00:02 +0000 (10:00 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 8 Oct 2011 10:00:02 +0000 (10:00 +0000)
Fix a bug in bccd9ec5f098668576342c83d90d6d6833d61d33,
target-arm/op_helper.c missed a change unlike all other targets.
This lead to a NULL pointer dereferences.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-arm/op_helper.c

index ab9c923..1892b35 100644 (file)
@@ -84,6 +84,7 @@ void tlb_fill(CPUState *env1, target_ulong addr, int is_write, int mmu_idx,
     int ret;
 
     saved_env = env;
+    env = env1;
     ret = cpu_arm_handle_mmu_fault(env, addr, is_write, mmu_idx);
     if (unlikely(ret)) {
         if (retaddr) {