Page 1 of 1

Strange problem - Invalid Opcode Exception

Posted: Sat Jun 07, 2008 1:25 pm
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 ^_^

Posted: Sat Jun 07, 2008 8:07 pm
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.

Posted: Sun Jun 08, 2008 1:50 am
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).

Posted: Sun Jun 08, 2008 5:58 am
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.