strange Bug

ba_f ba_f at rbg.informatik.tu-darmstadt.de
Wed Nov 26 20:45:12 CET 2014


Hillo,


> Can you repeat his with the hello example:
> 
> int
> main(void)
> {
>   for (;;)
>     {
>       puts("Hello World!");
>       *(volatile int *)0x0=0xaffedead;
>       sleep(1);
>     }
> }
> objdump -d pkg/hello/server/src/OBJ-arm_armv7a-l4f/hello
> 
> 010001e0 <main>:
>  10001e0:	e92d4830 	push	{r4, r5, fp, lr}
>  10001e4:	e30d4ead 	movw	r4, #57005	; 0xdead
>  10001e8:	e28db00c 	add	fp, sp, #12
>  10001ec:	e34a4ffe 	movt	r4, #45054	; 0xaffe
>  10001f0:	e3a05000 	mov	r5, #0
>  10001f4:	e59f0010 	ldr	r0, [pc, #16]	; 100020c <main+0x2c>
>  10001f8:	eb0024a2 	bl	1009488 <puts>
>  10001fc:	e5854000 	str	r4, [r5]
>  1000200:	e3a00001 	mov	r0, #1
>  1000204:	eb001f4b 	bl	1007f38 <sleep>
>  1000208:	eafffff9 	b	10001f4 <main+0x14>
>  100020c:	01012b50 	.word	0x01012b50
> 
> ===
> 
> and pc=0x10001fc matches exactly the page fault.


alright, this works for me, too.

I get unhandled write page fault @0 pc=1000228.
And objdump of hello shows the same instruction as yours, at PC.

Btw. i did execute on ARM directly, same as my actual project.

Now i revisited my project a found something.
When i add the faulty code in myClient, i find the PC with objdump.
But, when i put the faulty code in libClient, i.e. a shared lib which 
myClient uses, then i dont find the PC in myClient or libClient (but in 
moe).

So, the Error must happen somewhere in libClient.
But the question is why the PC is so strange, and how may it lead me to 
the fault?


Thanks,
ba_f




More information about the l4-hackers mailing list