aargh %-@
what's happening to my kernel ? once it generate an exception -- then it work if i recompile without actually changing a single line of the sources (just "touching" it) ??
sounds like i have several access to the "shared" null object ...
It's time for enforcing the #1 rule "thou shalt not follow the NULL pointer" and make sure Clicker will report attemps to break this rule even within the microkernel.
Here's the way i plan to handle it: i moved the kernel within its image so that it actually starts at 0x1000 rather than 0x0000 within its segment. The data segment has then been transformed so that it's now an expand-down big segment with a limit field of 1 (granularity=4K)
This means that valid offset in the data segment range from 0x0001000 to 0xffffffff.
I could have cleared the present bit of the page that holds 0x0000, but my loader doesn't guarantee that Clicker will be loaded on a page-aligned boundary, so it could have had nasty side-effects.
Note that so far, this only applies to the "plain data segment". Code segment doesn't have an "expand-down" facility, so what i made was to push special opcodes "0xff 0xff" at offset 0, so that if you try to jump or call a null function, you get an "invalid opcode" exception.
Hope it will help finding out my nasty bugz.
thou shalt not follow the NULL pointer
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact: