OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:13 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Kernel Crashes due to compiler optimization
PostPosted: Sat Jun 10, 2017 12:07 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 18, 2009 5:47 pm
Posts: 208
Location: Alexandria, Egypt | Ottawa, Canada
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?


Top
 Profile  
 
 Post subject: Re: Kernel Crashes due to compiler optimization
PostPosted: Tue Jun 13, 2017 11:22 am 
Offline
Member
Member

Joined: Mon Sep 19, 2016 5:34 am
Posts: 27
I'm not sure. But I think that was because inline assemblies that not marked as volatile

_________________
https://github.com/irvanherz/jaura/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], Octocontrabass and 92 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