

Code: Select all
func testB {
return 0
}
func testA {
testB:
return 0
}
func main {
testA:
return 0
}
Code: Select all
0D F0 0D 80 1B 00 00 00 00 00 00 00 E4 00 00 E3 0C 00 00 00 00 00 00 00 E4 00 00 E3 0F 00 00 00 00 00 00 00 E4 00 00
Holy ****, that's amazing!sortie wrote:I spent some time implementing POSIX regular expressions (<regex.h>) in my libc, so I could use them to implement the regexp matching operator (:) in expr(1):
It's not a time-efficient implementation yet, but it'll do. The main reason is that configure scripts do a lot of expr calls with regular expressions. Well, I implemented this and did a few odd adjustments and hacks, and I got configure scripts running on my OS. I managed to build some simple GNU packages like libiconv and grep fully on my OS. I then looked into the bigger packages like binutils and gcc. With a bunch of effort, I actually just managed to compile binutils and gcc on my OS and install them, and then build a hello world program with the new compiler.
Some screenshots that might be too big to link here inline? (1280x1024):
https://cs.au.dk/~sortie/sortix/screens ... sortix.png
https://cs.au.dk/~sortie/sortix/screens ... lzkthx.png
Yep. I'm going self-hosting big-time.
Classic BSODmallard wrote:I don't have anything that I'd really call a "user interface" yet, but I expect this screen will become somewhat familiar to any future users of my OS...
You don't know for sure?Probably NULL pointer dereference!
If an error occurs in userspace, I do. The BSOD only happens if kernel code causes the fault.max wrote: Why don't you kill the process and let the rest go on?
Well, the message really just means that a page fault has occurred on page 0, which is left unmapped specifically to catch NULL pointer errors. So, while there's a high probability that it's a NULL dereference, it's not certain. (Although the bug I deliberately triggered to take the screenshot was.)sortie wrote: You don't know for sure?
You can be certain it's a null-pointer access if the exception was a page fault and cr2 is set to 0.mallard wrote:Well, the message really just means that a page fault has occurred on page 0, which is left unmapped specifically to catch NULL pointer errors. So, while there's a high probability that it's a NULL dereference, it's not certain.