Opened 12 years ago

Closed 12 years ago

#490 closed defect (fixed)

arm32 task kill message prints incorrect address.

Reported by: Jan Vesely Owned by: Jiri Svoboda
Priority: minor Milestone: 0.6.0
Component: helenos/kernel/arm32 Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

The message printed looks like this:
Task init:ns (18433999634432) killed due to an exception at program counter 0x00000000.
r0 =0x0000001f r1 =0x00000000 r2 =0xf0006000 r3 =0x00000000
r4 =0x00000000 r5 =0x0001aedc r6 =0x00000000 r7 =0x00000000
r8 =0x00000000 r9 =0x0001b2dc r10=0x00000000 fp =0x7fffffe4
r12=0x00000001 sp =0x7fffff98 lr =0x000010bc spsr=0x60000050
0x7fffffe4: 0x000010c4()

note the task ID and program counter: 18433999634432 = 0x10c400000000
Looks like problem with printf in:
kernel/generic/src/interrupt/interrupt.c:170

Change History (2)

comment:1 by Jan Vesely, 12 years ago

This is getting tricky. I added another printf so the function looks like this:

static NO_TRACE void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args)
{

printf("Task id: %" PRId64 "\n", TASK→taskid);
printf("Task %s (%" PRIu64 ") killed due to an exception at "

"program counter %p.\n", TASK→name, TASK→taskid,
(void *) istate_get_pc(istate));

the ouptut was (stopped after the first printf):
Task id: 10748307332

and gdb says:
(gdb) p/x 10748307332
$2 = 0x280a62784
(gdb) x/s 10748307332
0x80a62784: "Page fault: %#x."

that's fmt argument. This might be a coincidence, the values beeing next to each other in memory, or va_lists got screwed up.

comment:2 by Jan Vesely, 12 years ago

Resolution: fixed
Status: newclosed

fixed in mainline,1655

Note: See TracTickets for help on using tickets.