Kernel Crashes due to compiler optimization

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.
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Re: Kernel Crashes due to compiler optimization

Post by iocoder »

yerri07 wrote:I tried above code cause another strange execution happened when i have a code to print functions in assembly and called the function from the c file(linked both files) , the first two instructions are not executed and but when i place a call to print the message with in the assembly file it executes correctly . So i gave a try compiling the above tutorial code.

see the disassembly of the code (push edi) in the image, the stack doesn't changed after the execution.

I will provide you the image that caused the strange execution.

1. After stepping the instruction
2.Before steeping the instruction
Looks like the emulator misinterprets the opcode at 0xc0001120. Are you sure your code never modifies this memory location?
irvanherz
Member
Member
Posts: 27
Joined: Mon Sep 19, 2016 5:34 am

Re: Kernel Crashes due to compiler optimization

Post by irvanherz »

I'm not sure. But I think that was because inline assemblies that not marked as volatile
Post Reply