Thread overview |
---|
May 07, 2004 longjmp Error: Access Violation | ||||
---|---|---|---|---|
| ||||
The following program runs correctly on Linux, but on Win2K it errors out: H:\bug.exe here! Error: Access Violation ----------------------------------------------------------- bug.d --------- import std.c.setjmp; int main() { jmp_buf jb; setjmp(jb); printf("here!\n"); longjmp(jb, 1); return 1; } ----------------------------------------------------------- setjmp.d --------- module std.c.setjmp; extern (C) { struct __nt_context { int esp; int info; int prev; int handler; int stable; int sindex; int ebp; }; /* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */ /* Define _CRTAPI1 (for compatibility with the NT SDK) */ /* Define _CRTAPI2 (for compatibility with the NT SDK) */ /* Define CRTIMP */ alias int jmp_buf[16]; extern (C) int _setjmp(jmp_buf); extern (C) int setjmp(jmp_buf); /* prototype provided for backward compatability */ extern (C) void longjmp(jmp_buf,int); extern (C) int _inline_setjmp(jmp_buf); /* * Define jump buffer layout for setjmp/longjmp under NT that unwinds stack */ struct __JUMP_BUFFER { uint Ebp; uint Ebx; uint Edi; uint Esi; uint Esp; uint Eip; uint Except_Registration; uint TryLevel; uint Reserved; uint Unwind_Handler; uint ExceptData[6]; } } ----------------------------------------------------------- setjmp.d --------- |
June 04, 2004 bug still there v0.91 Re: longjmp Error: Access Violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to some | In article <c7fb8q$25oi$1@digitaldaemon.com>, some@where.com says... > >The following program runs correctly on Linux, but on Win2K it errors out: > >H:\bug.exe >here! >Error: Access Violation > >----------------------------------------------------------- bug.d --------- >import std.c.setjmp; > >int main() >{ >jmp_buf jb; >setjmp(jb); >printf("here!\n"); >longjmp(jb, 1); >return 1; >} > >----------------------------------------------------------- setjmp.d --------- >module std.c.setjmp; > >extern (C) >{ > >struct __nt_context { >int esp; int info; int prev; int handler; int stable; int sindex; int ebp; }; >/* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */ > >/* Define _CRTAPI1 (for compatibility with the NT SDK) */ > >/* Define _CRTAPI2 (for compatibility with the NT SDK) */ > >/* Define CRTIMP */ > >alias int jmp_buf[16]; > >extern (C) int _setjmp(jmp_buf); >extern (C) int setjmp(jmp_buf); /* prototype provided for backward >compatability */ >extern (C) void longjmp(jmp_buf,int); > >extern (C) int _inline_setjmp(jmp_buf); > >/* >* Define jump buffer layout for setjmp/longjmp under NT that unwinds stack >*/ >struct __JUMP_BUFFER { >uint Ebp; >uint Ebx; >uint Edi; >uint Esi; >uint Esp; >uint Eip; >uint Except_Registration; >uint TryLevel; >uint Reserved; >uint Unwind_Handler; >uint ExceptData[6]; >} > >} > >----------------------------------------------------------- setjmp.d --------- > > |
June 08, 2004 bug still there v0.92 Re: longjmp Error: Access Violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to some | In article <c9r2a8$28hf$1@digitaldaemon.com>, some@where.com says... > >In article <c7fb8q$25oi$1@digitaldaemon.com>, some@where.com says... >> >>The following program runs correctly on Linux, but on Win2K it errors out: >> >>H:\bug.exe >>here! >>Error: Access Violation >> >>----------------------------------------------------------- bug.d --------- >>import std.c.setjmp; >> >>int main() >>{ >>jmp_buf jb; >>setjmp(jb); >>printf("here!\n"); >>longjmp(jb, 1); >>return 1; >>} >> >>----------------------------------------------------------- setjmp.d --------- >>module std.c.setjmp; >> >>extern (C) >>{ >> >>struct __nt_context { >>int esp; int info; int prev; int handler; int stable; int sindex; int ebp; }; >>/* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */ >> >>/* Define _CRTAPI1 (for compatibility with the NT SDK) */ >> >>/* Define _CRTAPI2 (for compatibility with the NT SDK) */ >> >>/* Define CRTIMP */ >> >>alias int jmp_buf[16]; >> >>extern (C) int _setjmp(jmp_buf); >>extern (C) int setjmp(jmp_buf); /* prototype provided for backward >>compatability */ >>extern (C) void longjmp(jmp_buf,int); >> >>extern (C) int _inline_setjmp(jmp_buf); >> >>/* >>* Define jump buffer layout for setjmp/longjmp under NT that unwinds stack >>*/ >>struct __JUMP_BUFFER { >>uint Ebp; >>uint Ebx; >>uint Edi; >>uint Esi; >>uint Esp; >>uint Eip; >>uint Except_Registration; >>uint TryLevel; >>uint Reserved; >>uint Unwind_Handler; >>uint ExceptData[6]; >>} >> >>} >> >>----------------------------------------------------------- setjmp.d --------- >> >> > > |
Copyright © 1999-2021 by the D Language Foundation