Load Ingest Data
Results 1 to 1 of 1

Thread: Crash on Floating Points error on OpenVMS 8.2-1

  1. #1
    Join Date
    Sep 2006
    Posts
    233
    Rep Power
    10

    Crash on Floating Points error on OpenVMS 8.2-1

    The AIS Server on OpenVMS v8.2-1 may crash when accessing invalid floating point data. The crash looks something like the following:

    Code:
    
    %SYSTEM-F-FLTINV, floating invalid operation, PC=FFFFFFFF84263180, PS=0000001B
    
      Improperly handled condition, image exit forced.
        Signal arguments:   Number =
                            Name   =
                                     FFFFFFFF84263180
                                     000000000000001B
        ...
    The reason why such floating point errors are not captured and handled by the AIS server is a bug in the HP C runtime library that is provided with HP OpenVMS v8.2-1.

    To resolve this problem please upgrade the OpenVMS to v8.3.

    To reproduce the problem to evaluate your system, use the following code:

    Code:
    A|NAV5010|nav> type flt.c
    #include <stdio.h>
    #include  <stdlib.h>
    #include <string.h>
    #include  <setjmp.h>
    #include <signal.h>
    #include  <ssdef.h>
    
    static unsigned int vms_handler(void  *sigarr, void *mecharr)
    {
        printf("VMS Handler - Resignaled\n");
        return SS$_RESIGNAL;
    }
    
    static void fpe_handler(int  signo)
    {
        printf("FPE error\n");
        exit(1);
    }
    
    static void bus_handler(int  signo)
    {
        printf("BUS error\n");
        exit(1);
    }
    
    int main(int argc, char  *argv[])
    {
        // The following line can be commented with the same  results
        VAXC$ESTABLISH(vms_handler);
    
        signal(SIGFPE,  fpe_handler);
        signal(SIGBUS, bus_handler);
        signal(SIGSEGV,  segv_handler);
    
        if (argc < 2) {
             printf("Usage: flt {0 | 1 }\n");
            exit(1);
        }
    
       if (*argv[1] == '0')  {
            char buff[4] = { 0,0,1,255};
            float *f;
            int  decpt = 0, sign = 0;
    
           printf("Creating floating  point exception\n");
            f = (float *)buff;
            fcvt(*f, 22,  &decpt, &sign);
       }
       
       if (*argv[1] == '1')  {
            long *p = (void *)main;
           printf("Creating bus  error\n");
            *p =;
       }
    
       printf("Done!\n");
    }
    When built on OpenVMS IA64 v8.2-1 the result is as follows:

    Code:
    A|NAV5010|nav> cc/ver
    HP C  V7.1-011 on OpenVMS IA64 V8.2-1
    A|NAV5010|nav> cc/float=g flt.c
    A|NAV5010|nav> link flt
    A|NAV5010|nav> flt :== $us:[nav]flt
    A|NAV5010|nav> flt 0
    Creating  floating point exception
    VMS Handler - Resignaled
    %SYSTEM-F-FLTINV,  floating invalid operation, PC=FFFFFFFF84263180,  PS=0000001B
    %TRACE-F-TRACEBACK, symbolic stack dump follows
    image      module    routine               line      rel PC           abs PC      
    LIBOTS                                        FFFFFFFF84263172
    FLT  FLT  main                            8580 
    FLT  FLT  __main                           
                                                 0  FFFFFFFF80C0E4B0  FFFFFFFF80C0E4B0
    DCL                                          0  000000000006AE90 000000007AE26E90
    %TRACE-I-END, end of TRACE stack  dump
    whereas when the same program runs on OpenVMS IA64 v8.3 the result is:

    Code:
    A|NAV5010|nav> flt 0
    Creating floating point exception                                                
    VMS Handler -  Resignaled                                                        
    FPE  error
    Last edited by DrorHarari; 02-27-2007 at 05:48 PM.
    By Dror Harari

    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •