As expected, it results in a giant backtrace with a bunch of blocks like below repeating, with the count (here 243) changing (usually between 200 and 250).
[ 443s] 0: fp=0xf7a5e5b8 pc=0x805e65a Foreign function fake_foreign_function_call_noassert
[ 443s] 1: fp=0xf7a5e5f8 pc=0x806556d Foreign function handle_guard_page_triggered
[ 443s] 2: fp=0xf7a5e648 pc=0x8075790 Foreign function (null)
[ 443s] 3: fp=0xf7a5e678 pc=0x805ed32 Foreign function (null)
[ 443s] 4: fp=0xf7a5ec78 pc=0xf7f6e580 Foreign function __kernel_rt_sigreturn
[ 443s] 5: fp=0xf7a5ecb8 pc=0x806556d Foreign function handle_guard_page_triggered
[ 443s] 6: fp=0xf7a5ed08 pc=0x8075790 Foreign function (null)
[ 443s] 7: fp=0xf7a5ed38 pc=0x805ed32 Foreign function (null)
[ 443s] 8: fp=0xf7a5f338 pc=0xf7f6e580 Foreign function __kernel_rt_sigreturn
[ 443s] 9: fp=0xf7a5f378 pc=0x806556d Foreign function handle_guard_page_triggered
[ 443s] 10: fp=0xf7a5f3c8 pc=0x8075790 Foreign function (null)
[ 443s] 11: fp=0xf7a5f3f8 pc=0x805ed32 Foreign function (null)
...
[ 443s] 243: fp=0xf7a77b78 pc=0x805ed32 Foreign function (null)
I added this line in interrupt.c with call to backtrace_ from_context:
if (lose_on_ corruption_ p) {
backtrace _from_context( context, 40000);
fake_ foreign_ function_ call(context) ;
lose( "Control stack exhausted, fault: %p, PC: %p",
addr, (void*) os_context_ pc(context) );
As expected, it results in a giant backtrace with a bunch of blocks like below repeating, with the count (here 243) changing (usually between 200 and 250).
[ 443s] 0: fp=0xf7a5e5b8 pc=0x805e65a Foreign function fake_foreign_ function_ call_noassert guard_page_ triggered rt_sigreturn guard_page_ triggered rt_sigreturn guard_page_ triggered
[ 443s] 1: fp=0xf7a5e5f8 pc=0x806556d Foreign function handle_
[ 443s] 2: fp=0xf7a5e648 pc=0x8075790 Foreign function (null)
[ 443s] 3: fp=0xf7a5e678 pc=0x805ed32 Foreign function (null)
[ 443s] 4: fp=0xf7a5ec78 pc=0xf7f6e580 Foreign function __kernel_
[ 443s] 5: fp=0xf7a5ecb8 pc=0x806556d Foreign function handle_
[ 443s] 6: fp=0xf7a5ed08 pc=0x8075790 Foreign function (null)
[ 443s] 7: fp=0xf7a5ed38 pc=0x805ed32 Foreign function (null)
[ 443s] 8: fp=0xf7a5f338 pc=0xf7f6e580 Foreign function __kernel_
[ 443s] 9: fp=0xf7a5f378 pc=0x806556d Foreign function handle_
[ 443s] 10: fp=0xf7a5f3c8 pc=0x8075790 Foreign function (null)
[ 443s] 11: fp=0xf7a5f3f8 pc=0x805ed32 Foreign function (null)
...
[ 443s] 243: fp=0xf7a77b78 pc=0x805ed32 Foreign function (null)