Looking for WinNT 3.51 volunteer

Bruno Haible haible@ilog.fr
Thu Jan 15 07:26:00 GMT 1998


The function longjmp() does not work in Mingw32 (egcs-1.00 release)
on WinNT 3.51. Instead, the process exits, without any error message.

Here is a test example:

#include <stdio.h>
#include <setjmp.h>

void foo1 (jmp_buf buf)
  printf("entering foo1\n");
  printf("exiting foo1\n");

void foo2 (jmp_buf buf)
  printf("entering foo2\n");
  printf("exiting foo2\n");

void foo3 (jmp_buf buf)
  printf("entering foo3\n");
  printf("exiting foo3\n");

int main ()
  jmp_buf buf;
  printf("entering main\n");
  if (setjmp(buf)==0)
    printf("returned from longjmp\n");
  printf("exiting main\n");
  return 0;

On any reasonable Unix machine, this prints:

entering main
entering foo3
entering foo2
entering foo1
returned from longjmp
exiting main

On mingw32, WinNT 3.51, it prints:

entering main
entering foo3
entering foo2
entering foo1

Note that gdb from mingw32 on this system has the same behaviour:
Anything which makes a gdb command abort (like typing `q' or any error)
kills gdb.

Can someone try to track this down?

I tried the following:
  - On Win95 longjmp works ok.
  - copying the Win95 crtdll.dll to WinNT's SYSTEM32 directory doesn't help.
  - bzero'ing the jmp_buf before the setjmp doesn't help.
  - removing lib\gcc-lib\i386-mingw32\egcs-2.90.21\ld doesn't help.
  - using the specs.crt instead of specs doesn't help; the other two specs.*
    files yield link errors.

Bruno <haible@ilog.fr>
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list