Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

SDE emulation issue

srinivasu
Beginner
684 Views

I am using the SDE emulator with AVX2 instruction set, I have written some simple program but it is crashing in RELEASE mode with SDE emulator.

Please let me know whether SDE emulates the stack related operations or not.  YASM synatxed assembly programming

section .txt
 global dummy_asm
    dummy_asm:

    push rbp
    mov  rbp, rsp
    sub rsp, 1024
    
    push rbx ;no need to push in this program, but in actual program using this register
    
    vmovdqu [rsp], xmm0 ;xmm0 is dummy value

    pop rbx

    mov rsp, rbp ; restore rsp
    pop rbp ; restore previous rbp

    ret
    
      

0 Kudos
4 Replies
JenniferJ
Moderator
684 Views

I think your question/issue would get better response in this forum: https://software.intel.com/en-us/forums/intel-isa-extensions and will transfer it to there instead.

Jennifer

0 Kudos
MarkC_Intel
Moderator
684 Views

Yes, SDE does handle all stack operations. Possibly you exceeded your allowed stack space or created a stack alignment issue with your function call. You can use "-debugtrace -dt-flush" to see where it gets caught up in your code.

 

What did you do? Here's what I did:

 

% cat simp.c
extern void dummy_asm();
int main(){
    dummy_asm();
    return 0;
}
% cat simple.yasm 
[bits 64]
global dummy_asm
dummy_asm:
    push rbp
    mov  rbp, rsp
    sub rsp, 1024
    push rbx 
    vmovdqu [rsp], xmm0 
    pop rbx
    mov rsp, rbp 
    pop rbp
    ret
% yasm -felf64 simple.yasm 
% gcc -o simp  simp.c simple.o
% current/sde -- ./simp


 

0 Kudos
srinivasu
Beginner
684 Views

Thanks Mark for quick reply. I have done this experiment in the Windows Environment(MS Visual Studio), In "Debug" mode, it is working fine but causing problem in "Release" mode. This dummy function is calling from my actual application in the Visual Studio 2010, causing my application is crashing.

Any further help to trace out actual issue?

0 Kudos
MarkC_Intel
Moderator
684 Views

Hi, not sure if this is still relevant. If you still need to get more information, you can try to  use the debugtrace tool as mentioned above or the Intel SDE debugging extensions.

 

0 Kudos
Reply