Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <019601bf4c05$b9b4e210$2301a8c0@mediadb.net> From: "Matthew Brown" To: Subject: Signal hang Date: Tue, 21 Dec 1999 17:50:06 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0192_01BF4BDB.D0C7CFA0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 ------=_NextPart_000_0192_01BF4BDB.D0C7CFA0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0193_01BF4BDB.D0C7CFA0" ------=_NextPart_001_0193_01BF4BDB.D0C7CFA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am attempting to build libstdc++ 2.90.6 with the following = configuration: - Windows NT4 sp3 - cygwin full b20.1 - Mumit's gcc 2.95.2 installed according to instructions The symptom is that when mknumeric_limits runs, it hangs in a loop (CPU = is chewed-up and nothing useful happens). When I dig into things, I find = that gen-num-limits.exe is where the loop is happening, and, when I dig = in farther, I find that the loop is in exception handling code. = gen-num-limits is trying to generate divide-by-zero and overflow errors = for various intrinsic types; this is where the problem is occurring. If I run gen-num-limits interactively (so it spews to the terminal), I = see that the behavior is not consistent; sometimes it chokes on = divide-by-zero for one type and sometimes for another. Here is a small program with which I can reproduce the problem simply = (built with no special options): ------------------------------ cut here ---------------------------- #include #include #include jmp_buf env; void signal_handler(int sig)=20 {=20 fprintf(stderr, "caught a signal\n");=20 longjmp(env, sig);=20 } typedef char tested_type; int main(int argc, char **argv) { signal(SIGFPE, signal_handler); if (setjmp(env) =3D=3D 0) { fprintf(stderr, "set the jump return location\n"); tested_type zero =3D tested_type(); tested_type one =3D tested_type(1); tested_type junk =3D one / zero; } fprintf(stderr, "Done!\n"); return 0; } ------------------------------ cut here ---------------------------- This is essentially the flow of processing that occurrs in = gen-num-limits. With tested_type set to an integral type (including = bool), sometimes it works, sometimes it loops. Sometimes it just exits. Does anyone know of an issue here? Vadim Egorov posted a message about this a few months ago, but there are = no replies on this list. Thanks for any help. -- Matthew Brown ------=_NextPart_001_0193_01BF4BDB.D0C7CFA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am attempting to build = libstdc++ 2.90.6=20 with the following configuration:
 
- Windows NT4 sp3
- cygwin full = b20.1
- Mumit's gcc 2.95.2 installed = according to=20 instructions
 
The symptom is that when = mknumeric_limits=20 runs, it hangs in a loop (CPU is chewed-up and nothing useful happens). = When I=20 dig into things, I find that gen-num-limits.exe is where the loop is = happening,=20 and, when I dig in farther, I find that the loop is in exception = handling code.=20 gen-num-limits is trying to generate divide-by-zero and overflow errors = for=20 various intrinsic types; this is where the problem is = occurring.
If I run gen-num-limits = interactively (so=20 it spews to the terminal), I see that the behavior is not consistent; = sometimes=20 it chokes on divide-by-zero for one type and sometimes for=20 another.
 
Here is a small program with = which I can=20 reproduce the problem simply (built with no special = options):
 
------------------------------ = cut here=20 ----------------------------
#include = <signal.h>
#include=20 <setjmp.h>
#include <stdio.h>
 

jmp_buf env;
 
void signal_handler(int sig) =
{=20
   fprintf(stderr, "caught a signal\n");
  =20 longjmp(env, sig);
}
 
typedef char  =20 tested_type;
 
int main(int argc, char=20 **argv)
{
   signal(SIGFPE, = signal_handler);
   if=20 (setjmp(env) =3D=3D 0)
   = {
     =20 fprintf(stderr, "set the jump return location\n");
 
     =20 tested_type     zero =3D=20 tested_type();
     =20 tested_type     one =3D=20 tested_type(1);
     =20 tested_type     junk =3D one / zero;
   = }
 
   fprintf(stderr,=20 "Done!\n");
   return 0;
}
------------------------------ = cut here=20 ----------------------------
 
This is essentially the flow of processing that occurrs in = gen-num-limits.=20 With tested_type set to an integral type (including bool), sometimes it = works,=20 sometimes it loops. Sometimes it just exits.
 
Does anyone know of an issue here?
 
Vadim Egorov posted a message about this a few months ago, but = there are no=20 replies on this list.
 
Thanks for any help.
 
-- Matthew Brown
------=_NextPart_001_0193_01BF4BDB.D0C7CFA0-- ------=_NextPart_000_0192_01BF4BDB.D0C7CFA0 Content-Type: text/x-vcard; name="Matthew Brown.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Matthew Brown.vcf" BEGIN:VCARD VERSION:2.1 N:Brown;Matthew FN:Matthew Brown ORG:Concord Software, Inc. TITLE:Senior Programmer TEL;WORK;VOICE:(603) 880-8151 TEL;WORK;FAX:(603) 886-1780 ADR;WORK:;;4 John Tyler Street;Merrimack;New Hampshire;03054;USA LABEL;WORK;ENCODING=3DQUOTED-PRINTABLE:4 John Tyler = Street=3D0D=3D0AMerrimack, New Hampshire 03054=3D0D=3D0AUSA X-WAB-GENDER:2 URL: URL:http://www.concordsw.com EMAIL;PREF;INTERNET:mbrown AT mediadb DOT net REV:19991221T225006Z END:VCARD ------=_NextPart_000_0192_01BF4BDB.D0C7CFA0 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com ------=_NextPart_000_0192_01BF4BDB.D0C7CFA0--