Strange problem - Invalid Opcode Exception

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
finarfin
Member
Member
Posts: 106
Joined: Fri Feb 23, 2007 1:41 am
Location: Italy & Ireland
Contact:

Strange problem - Invalid Opcode Exception

Post by finarfin »

I have a strange problem.
Whe I boot my OS compiled on my pc, it raises an invalid opcode exception.

This problem only happens to me, in fact different people have tried to compile and boot the OS and it works without any problem.
My pc has Debian SID installed and gcc 4.3.1, and another pc is equipped with Archlinux and gcc 4.3.0.
Those who tried the OS have different distros, but they all have a gcc version older than 4.3.0.
Is it possible that newer versions of gcc cause this crash?
The compilation is Ok, the problem appears at boot time.

Help me please ^_^
User avatar
Telgin
Member
Member
Posts: 72
Joined: Thu Dec 20, 2007 1:45 pm

Post by Telgin »

Is it 100% repeatable? If it only happened once, I suppose it could be something obscure like a memory error feeding the processor garbage.

Other than that, I don't know if GCC could cause that since I wouldn't think that the opcodes for any instructions would have changed between processor versions. Intel was very strong willed about backwards compatibility afterall.

As to what's causing it... can't really say without more information.
User avatar
finarfin
Member
Member
Posts: 106
Joined: Fri Feb 23, 2007 1:41 am
Location: Italy & Ireland
Contact:

Post by finarfin »

That problem happen both on my pc, every time i try to compile my os.

Both pc have gcc>=4.3.0

And also older versions of the os that few days ago worked well, now had stopped to work (after an update of both ArchLinux, and debian).
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

If you disassemble your kernel image with objdump -d, you can look in the output to see what instruction is at the location that EIP points to when the exception occurs. Then you can use that to try to work out what is wrong with it.

Hope that helps.
Post Reply