[okl4-developer] [PATCH] broken NONEXISTANT_TID in l4test on 64bit archs

Geoffrey Lee glee at ok-labs.com
Tue Sep 23 14:45:29 EST 2008


On Tue, Sep 23, 2008 at 02:31:46PM +1000, Tomas Hruby wrote:
> The 32bit constant (0x13371401UL) does not set the thread_no field of
> the L4_ThreadId_t which causes failure in IPC0700 test in l4test suite
> since the thread_no is 0 and lookup_ipc_cap_locked() returns a valid
> tcb. The patch splits the original value (probably anything random
> would work as well) and sets thread_no and version separately.


Hi Tomas

Thanks for the bug report, this fix should be in the next release
of OKL4.

	-gl

> 
> diff -ur orig/l4test/src/ipc.c fix/l4test/src/ipc.c
> --- orig/l4test/src/ipc.c	2008-09-23 14:19:18.000000000 +1000
> +++ fix/l4test/src/ipc.c	2008-09-23 14:20:59.000000000 +1000
> @@ -81,7 +81,11 @@
>  
>  /* Magic numbers for checking things */
>  #define MAGIC_LABEL1    0xdead
> -static const L4_ThreadId_t NONEXISTANT_TID = { 0x13371401UL };
> +static const L4_ThreadId_t NONEXISTANT_TID = {
> +		.global.X.thread_no = 0x13371401UL >> 14,
> +		.global.X.version = 0x13371401UL & ((1 << 14) - 1)
> +};
> +
>  
>  static L4_ThreadId_t main_thread;
>  static L4_ThreadId_t other_thread;
> 
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
> 

-- 




More information about the Developer mailing list