Title: | C++ |
Notice: | Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS) |
Moderator: | DECCXX::AMARTIN |
Created: | Fri Nov 06 1987 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3604 |
Total number of notes: | 18242 |
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3205.1 | interesting one! | DECC::KIMMEL | Fri Aug 16 1996 11:57 | 8 | |
3205.2 | mode=ios::out, prot=filebuf::openprot | CADSYS::LANE | Fri Aug 16 1996 16:40 | 21 | |
3205.3 | anything changing the location of the file? | HNDYMN::MCCARTHY | A Quinn Martin Production | Mon Aug 19 1996 10:03 | 8 |
3205.4 | is it already opened by someone else? | HNDYMN::MCCARTHY | A Quinn Martin Production | Mon Aug 19 1996 10:17 | 7 |
3205.5 | file doesn't exist before open() call | CADSYS::LANE | Mon Aug 19 1996 11:49 | 29 | |
3205.6 | NQOS01::nqsrv427.nqo.dec.com::lusk | Three monkeys, ten minutes | Wed Sep 11 1996 12:52 | 2 | |
3205.7 | deja vu, all over again... | WRHS79::LANE | Thu Jan 16 1997 16:57 | 65 | |
3205.8 | TLE::D_SMITH | Duane Smith -- DEC C RTL | Thu Jan 16 1997 20:48 | 14 | |
3205.9 | WRHS79::LANE | Fri Jan 17 1997 11:09 | 35 | ||
3205.10 | start here.... | HNDYMN::MCCARTHY | A Quinn Martin Production | Fri Jan 17 1997 11:14 | 9 |
3205.11 | problem still exists in DECC$SHR T06.2-05 | WRHS79::LANE | Fri Jan 17 1997 13:12 | 8 | |
3205.12 | message to cerr never gets displayed... | DECC::J_WARD | Fri Jan 17 1997 14:13 | 19 | |
3205.13 | cerr | WRHS79::LANE | Fri Jan 17 1997 14:49 | 20 | |
3205.14 | Debugging this offline | TLE::D_SMITH | Duane Smith -- DEC C RTL | Fri Jan 17 1997 17:19 | 2 |
3205.15 | mea culpa | WRHS79::LANE | Fri Jan 24 1997 09:37 | 27 | |
Well, I had something like this in my program that got executed at some point prior to calling ifstream::open(): buffer = new char [strlen(value)]; strcpy(buffer, value); It just so happened in this particular case that the null byte ended up clearing the "blockSize" field in the header of a memory block maintained by LIB$VM_MALLOC(). When ifstream::open() got called, it in turn called the C RTL routine open(). In open(), the RMS blocks get allocated and initialized before SYS$OPEN() is called. calloc() (which calls LIB$VM_CALLOC()) is called to allocate the RMS blocks. When the NAM block got allocated, LIB$VM_MALLOC() returned the block with the incorrect zeroed block size, then LIB$VM_CALLOC() didn't clear anything because the block size was zero. So, the NAM block fields had junk in them and this is what caused the RMS$_RLF error returned by SYS$OPEN(). As usual, just when I begin to suspect the problem is in someone else's code, it winds up being my problem all along. Thanks to Duane for the help in setting up so I could find the cause of this bizarre problem. Roy |