Loading ...
Sorry, an error occurred while loading the content.

30004Re: win32 libcall() crash not found

Expand Messages
  • Bram Moolenaar
    Oct 8, 2002
    • 0 Attachment
      Bruce Mellows wrote:

      > This is the code to protect a function from a GPF.
      >
      > NOTE...
      >
      > - The critical part of the work *MUST* be done in assembler - so I
      > decided that it might be best if it was ALL in assembler - so it can be
      > in one place (the actual exception handler could have been done in less
      > than ten lines of C).
      >
      > - The assembler used is nasm - I could re-write it in masm if that was
      > preferred.

      Bummer. I do like the protection against crashes, but using assembly
      makes it very difficult to compile Vim on various platforms (64 bit
      anyone?).

      It appears your code also catches a crash in the called function. That
      was not really required. Would it be possible to avoid the assembly
      code when we only want to check the returned pointer? There actually is
      a function for this (to check the validity of a pointer), but I couldn't
      make it work.

      --
      hundred-and-one symptoms of being an internet addict:
      161. You get up before the sun rises to check your e-mail, and you
      find yourself in the very same chair long after the sun has set.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
    • Show all 15 messages in this topic