OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 8:58 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Such a boneheaded mistake I have to tell everyone!
PostPosted: Sun Jul 29, 2001 5:02 pm 
Some of you may have already seen this on my webiste, but I just spent the last three days agonizing over a perplexing bug. ?Whenever I would reach a certain point in the kernel code, VMWare would barf. ?If I ran it on a real machine, it would triple fault and reset. ?Always at the same place too: 0x000102b5, and there wasn't even an instruction there, it was the middle of an instruction! ?Well after thinking I was doing something incredibly wrong with selectors, idts, and everything else, it turns out that it was my kernel installer scripts! ?Aaarrgghh!

Check it out, in the script I do a:

dd if=./entry.bin of=/dev/fd0 bs=512 count=1 skip=1

Well, as I'm writing my kernel code, it of course is growing beyond 512 bytes, but I never bothered to change the count! ?So of course after my processor got past the first 512 bytes of my code, the rest of it was junk. ?DUH!

I hope you enjoy this story, and let it be a lesson to everyone (at my expense) that bugs aren't always in the code, sometimes you've got to take a step back. ?The IA-32 System Programmer's Manual couldn't help me with my problem this time, but ls -l could ?::)

P.S. ?A new version of the kernel that can handle exceptions should be on my website (look in signature below) by later this evening... I hope :)


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 148 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group