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

Conference turris::decc

Title:DECC
Notice:General DEC C discussions
Moderator:TLE::D_SMITHNTE
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2212
Total number of notes:11045

1454.0. "Any hints? (ROPRAND from a malloc)" by CRAYON::GENT (Revolutionize yourself) Thu Sep 21 1995 16:06

T.RTitleUserPersonal
Name
DateLines
1454.1More infoCRAYON::GENTRevolutionize yourselfThu Sep 21 1995 16:096
1454.2CSC32::D_DERAMODan D'Eramo, Customer Support CenterThu Sep 21 1995 17:069
1454.3Thank you (sigh)CRAYON::GENTRevolutionize yourselfFri Sep 22 1995 09:428
1454.4Thank you. Dan and FAKE_VM solved my problem.CRAYON::GENTRevolutionize yourselfFri Sep 22 1995 14:349
1454.5VAX/VMS V5.5-2, DECC V5.0-003; FAKE_VM available?LASSIE::BISHOVWed May 21 1997 15:3924
    Am having a problem which may be similar to the one Andrew outlined in
    the base note for this stream.  Dump for error includes the following
    lines at the top, with the line in MAKE_LIB being at a malloc call:
    
 SHARE$LIBRTL                                               00000000  00064522
 SHARE$DECC$SHR                                             00000000  00034C47
 MAKE_LIB        MAKEVARBINDWITHVALUE                       0000004A  0001435E
 .
 .
 .
    
    For similar problem at different program locations, the top two pc
    values are the same; all lines in application code come from malloc
    calls.
    
    Note .3 refers to FAKE_VM as a way of locating locations of overwritten
    memory.  Is that, or a similar method, available?  (This is code I've
    inherited, do not yet know all the details, but can reproduce the
    getting the ROPRAND error when forcing many small mallocs.  Still
    checking for memory leak.)
    
    Thanks,
    
    Sheldon
1454.6Heap Analyzer, If You Can Use V6.1 or Later...XDELTA::HOFFMANSteve, OpenVMS EngineeringWed May 21 1997 16:5918
   FAKE_VM has been available for a while, and there are likely versions
   for OpenVMS VAX V5.5-2.  The conference is located at CLT::FAKE_VM.

   Another option would be a test bed running a rather more recent version
   of OpenVMS VAX (such as V6.1), and using the Heap Analyzer present in
   the OpenVMS Debugger.

   I've typically used "wrappers" around lib$get_vm calls and centralized
   all memory management into a few (or one) source modules -- with names
   and calling interfaces similar to malloc() -- and have then been able
   to place quadwords at the front and the back of the allocated area,
   hidden from the caller.   I could then use these quadwords to detect
   all manner of data under- or over-runs, and could use the rest of the
   lib$vm calls to check the status or -- my favorite technique -- flush
   whole pools of temporary memory in a single call.  (This is a variantion
   on what FAKE_VM does.)

1454.7Thanks, will take a lookUCXAXP::BISHOVThu May 22 1997 09:047
    Thanks for the suggestions, Steve.  The first two options look like the
    best to try short term.  The last may be long term possibility, since
    it sounds like the most sound from an engineering point of view; right
    now since the problem is in ported code I've just taken over, am aiming
    to make as few changes as possible.
    
    Sheldon