[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::decc_bugs

Title:DEC C Problem Reporting Forum
Notice:Report DEC C++ problems in TURRIS::C_PLUS_PLUS
Moderator:CXXC::REPETETCHEON
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1299
Total number of notes:6249

1265.0. "VMS V7.0: ACCVIO in strstr when string ends near page boundary" by TURRIS::lspace.zko.dec.com::winalski (PLIT Happens...) Thu Feb 20 1997 14:45

The Ada compiler has turned up what looks like a bug in the VMS V7.0 C RTL's 
strstr() function.  This originally came from a very hot customer CLD, so 
please give it prompt attention and keep Charlie McCutcheon informed of 
progress.

Here is a small C program that reproduces the problem, and a session script 
illustrating the ACCVIO.  Note the NUL byte terminating the first argument to 
strstr() is within 4 bytes of a page boundary and that the next page of memory 
does not exist.  This program runs correctly if you use the V6.2 C RTL.
=====================================
$ type bug.c
#include <string.h>
#include <stdio.h>
int sys$cretva();

int main() {
    int inadr[2];
    int retadr[2];
    int status;
    char *s;
    char *t;

    inadr[0] = 0x00100000;
    inadr[1] = 0x00100000;
    status = sys$cretva(inadr, retadr, 0);
    if ((status % 2) == 0) {
        printf("*** sys$cretva returned %x\n", status);
        return 0;
    }

    s = (char *) 0x00101fe4;
    strcpy(s, "GEM_TN_INIT: TNR_ZONE_ID");
    printf("string s is at %x and contains \"%s\"\n", s, s);
    t = strstr(s, "_EIL_ZONE");

    return 0;
}
$ cc bug
$ link bug
$ run bug
string s is at 101fe4 and contains "GEM_TN_INIT: TNR_ZONE_ID"
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual 
address=000000000010
2001, PC=FFFFFFFF8057C2F8, PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
  image    module    routine             line      rel PC           abs PC
                                            0 FFFFFFFF8057C2F8 FFFFFFFF8057C2F8
                                            0 FFFFFFFF805CAB5C FFFFFFFF805CAB5C
 BUG  BUG  main                          1094 0000000000000160 0000000000020160
 BUG  BUG  __main                           0 0000000000000064 0000000000020064
                                            0 FFFFFFFF82B82914 FFFFFFFF82B82914
$


T.RTitleUserPersonal
Name
DateLines
1265.1TURRIS::lspace.zko.dec.com::winalskiPLIT Happens...Thu Feb 20 1997 14:461
see also GEM_BUGS note 5993
1265.2KMOOSE::CMCCUTCHEONCharlie McCutcheonThu Feb 20 1997 16:3210
Hi, please contact me with any analysis.

This customer's problem has been open for over a month, and several
level's of VP's have been "notified".  Reference CLD MGO102644.

They are currently using Alpha VMS 7.1.  I also see the problem with
VMS 7.0.

Charlie
DEC Ada
1265.3entered into crtl_internalTAVENG::BORISBoris Gubenko, ISEThu Feb 20 1997 17:515
  This is being tracked in crtl internal notes conference as problem
  # 1671.

  Boris
1265.4StatusTAVENG::BORISBoris Gubenko, ISEThu Feb 20 1997 21:167
  We fixed the bug in our development stream and now we need to build the DEC
  C RTL with the fix and wait for the whole test system run. If everything
  goes well, we'll enter into the ECO kits building process (we will need ECO
  kits for OpenVMS Alpha V7.0 and V7.1).

  Boris
1265.5Can I test too?KMOOSE::CMCCUTCHEONCharlie McCutcheonFri Feb 21 1997 09:018
Hi, when you feel comfortable, please give me a C RTL image so I can
try recompiling the customer's sources with it.

What we've given you is massively cut down.  I need to insure that we
gave you the right issue before we can call this solved/closed!

Thanks,
Charlie
1265.6the image with the fix was passed for testingTAVENG::BORISBoris Gubenko, ISEFri Feb 21 1997 19:5114
   I put DEC C RTL shareable image for Alpha with the fix on default
   DECnet account on TLE:

Directory TLE""::DISK$DECNET:[DECNET]DECC$SHR.EXE_DECC_BUGS_1265;1

   What you should do is to copy the image and point DECC$SHR logical to it,
   as follows:

   $DEFINE DECC$SHR DISK:[DIRECTORY]DECC$SHR.EXE_DECC_BUGS_1265

   If you relink the application with this image, ignore
   "%LINK-I-DATMISMCH, creation date..." message.

   Boris
1265.6TLE::D_SMITHDuane Smith -- DEC C RTLWed Feb 26 1997 07:315
    The checkin of this fix has been made to the RAVEN_FT1 master pack. 
    The next round of ECO kits for OpenVMS V7.0 and V7.1 should begin
    sometime next week.
    
    Duane
1265.7RAVEN == OpenVMS V7.2TLE::D_SMITHDuane Smith -- DEC C RTLWed Feb 26 1997 07:311