cvs.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000055

When Created: 01/26/1996 10:37:23
Against DJGPP version: 2.00.beta4
By whom: rudd@cyberoptics.com
Abstract: Failed assert() causes infinite loop
I compiled this little program

   #include <assert.h>
   int main() {
      assert(1 == 2);
      return 0;
   }

under DJGPP v2 beta 4 using

   gcc assertbg.c -g -o assertbg

but the failure of the assertion produced some sort of infinite loop:

Assertion failed at assertbg.c line 3: 1 == 2
Exiting due to signal SIGABRT
Bad signal handler, Exiting due to signal SIGABRT
Bad signal handler, Exiting due to signal SIGABRT
Bad signal handler, Exiting due to signal SIGABRT
Bad signal handler, Exiting due to signal SIGABRT
Bad signal handler, Exiting due to signal SIGABRT

etc., etc.  I pressed CNTL-break to abort...

Bad signal handler, Exiting due to signal SIGINT 
Control-Break Pressed at eip=00002f46                                           
eax=00000000 ebx=00000021 ecx=00000000 edx=00000000 esi=00000014 edi=0004b7d4   
ebp=0004b7b0 esp=0004b7a4 cs=00e7 ds=00ef es=00f7 fs=00cf gs=00ff ss=00ef       
Call frame traceback EIPs:                                                      
  0x00002f46   ___dpmi_int+114                                                  
  0x00002ad2   __write+150                                                      
  0x000025f2   _raise+186                                                       
  0x00001e31   ___dj_assert+37                                                  
  0x00001545   _main+25, line 4 of assertbg.c                                   
  0x00001a15   ___crt1_startup+401                                              
                                                                                
C:\TEMP>symify assertbg.exe                                                     

and used "symify" to get a traceback.  I have no idea what causes this
problem.  The program executes correctly under v1.12 m4.  This problem is
reproducible on multiple platforms (EMM386, no EMM386, two Pentiums, a 386,
straight DOS, shelled out from Windows).

                                                          -Eric Rudd

Solution added: 01/30/1996 22:22:14
By whom: sandmann@clio.rice.edu
This is a bug in the raise() program in dpmiexcp.c.  I found this 
a couple of days ago - DJ has the patch.  It will go into beta 5
and the release.

Fixed in version 2.00.beta5 on 02/01/1996 13:17:49
By whom: dj@delorie.com



  webmaster     delorie software   privacy  
  Copyright © 2010   by DJ Delorie     Updated Jul 2010