Project

General

Profile

Actions

Bug #8678

open

Exception in exception handler

Added by Alexander Kamkin over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
Start date:
01/18/2018
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

The situation is as follows. An instruction causes an exception (namely TLBMiss). A trap handler tries to execute mfc0, which, for some reason, causes another exception. This leads to endless looping.

IMHO, mfc0 generates CU0 (i.e., the handler executes in the user mode).

Execution status: 0xffffffffa0005b04

0xffffffffa0005b04 
0xffffffffa0005b04 lui r16, 0x14
0xffffffffa0005b08 
0xffffffffa0005b08 lui r17, 0x14
0xffffffffa0005b0c ori r4, r0, 0xad6e
0xffffffffa0005b10 dsll r4, r4, 16
0xffffffffa0005b14 ori r4, r4, 0x6aa9
0xffffffffa0005b18 dsll r4, r4, 16
0xffffffffa0005b1c ori r4, r4, 0x67f9
0xffffffffa0005b20 dsll r4, r4, 16
0xffffffffa0005b24 ori r4, r4, 0x2525
.align 4
m_0042:
0xffffffffa0005b40 ld r4, 0(r16)
Exception was raised: TLBMiss
Jump to handler of TLBMiss at 0xffffffffa0002380.
.org 0x380
Exception handler (EPC = 0xffffffffa0005b40)
0xffffffffa0002380 mfc0 r31, $14, 0
0xffffffffa0002384 addiu r31, r31, 4
0xffffffffa0002388 jr r31
0xffffffffa000238c nop
Jump to 0xffffffffa0005b44
0xffffffffa0005b44 sd r5, 0(r17)
Exception was raised: TLBMiss
Jump to handler of TLBMiss at 0xffffffffa0002380.
.org 0x380
Exception handler (EPC = 0xffffffffa0005b44)
0xffffffffa0002380 mfc0 r31, $14, 0
Error: Instruction mfc0 r31, $14, 0 reached its limit on execution count (200). Probably, the program entered an endless loop. Generation was aborted.
Generation was aborted.
Actions #1

Updated by Alexander Protsenko over 6 years ago

  • Status changed from New to Resolved
  • Assignee changed from Alexander Protsenko to Alexander Kamkin

"limit on execution count (200)" - it's MicroTESK bug.

Updated exception handler.
Added exception: "Coprocessor Unusable Exception" for COP0.
012a1043d65a1610980d29dce4c46a5662beee03

Actions

Also available in: Atom PDF