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

Conference turris::c_plus_plus

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

3603.0. "malloc segv but no info" by PADC::KOLLING (Karen) Wed Jun 04 1997 16:56

    Any clue as to what this is?   Or how I can find out, i.e. is there a
    libc with debugging info in it?  This is UNIX V4.0A  (Rev. 464). 
    Thanks.
    
    Thread received signal SEGV
    stopped at [UnknownProcedure17FromFile22: ??? 0x3ff80192e98]
    (ladebug) where
    >0  0x3ff80192e98 in UnknownProcedure17FromFile22(0x3ff801943c8, 0x1,
    0x10, 0x3ffc0080e18, 0x141052c40, 0x14003d158)
    DebugInformationStrippedFromFile22:???
    #1  0x3ff801943c4 in /usr/shlib/libc.so
    #2  0x3ff80194604 in /usr/shlib/libc.so
    #3  0x3ff800d1958 in malloc(0x3ff800d195c, 0x14003d158, 0x120198bbc,
    0x0, 0x0, 0x14003d158) DebugInformationStrippedFromFile22:???
    
T.RTitleUserPersonal
Name
DateLines
3603.1first reaction...WIBBIN::NOYCEPulling weeds, pickin' stonesWed Jun 04 1997 17:457
As I'm sure you know, segv's in malloc are most often caused by
user bugs that overwrite the data structures malloc uses to keep
track of its heap.  Look for overrunning the ends of arrays,
using memory after it's been freed, using ininitialized pointers,
returning the address of automatics that no longer exist, etc.
Perhaps Third Degree could help.
	-- Bill
3603.2PADC::KOLLINGKarenWed Jun 04 1997 18:133
    What's Third Degree?  I did a dir title and came up with zippo.
    Thanks.
    
3603.3Glad you asked ... (Third Degree)DECC::SULLIVANJeff SullivanWed Jun 04 1997 18:4319
ATOM's third degree (available on Digital UNIX V4.0 and later) can sometime help
find memory overwrites. I've used it successfully several times to disprove
"compiler optimizer bugs" that were actually problems in the user's source code.

The advantage, I think, is that the problem is not masked by optimization level
("When I compile it -g, the problem goes away") or other such variables.

See also:

   Programmer's Guide (chapter 7)
    http://www.zk3.dec.com/~binder/platinum/AA-PS30D-TET1_html/peg8.html
  
  Program Analyis web page:
    http://www.zk3.dec.com/dude/program_analysis/


Hope it helps.

-Jeff
3603.4Also GPA, available (separately) with T5.6-009 kitDECC::SULLIVANJeff SullivanWed Jun 04 1997 18:4429
If you like ATOM, you may also like GPA. I've been using ATOM for a while and
have just started using GPA, which is available (separately) with the DEC C++
T5.6-009 kit. I like it. It makes ATOM third degree and hiprof much easier to
use (read user-friendly).

See note TURRIS::C_PLUS_PLUS Note 3546 in this conference or
http://www.zk3.dec.com/decc/decc-kitinfo.html for info on how to get a copy.

From the announcement:

        The Graphical Program Analysis Tools (GPA) are a new set of 
        standalone tools for examining the runtime behavior of a program.
        The Profiler provides an easy-to-use, graphical interface for the
        gprof, hiprof, pixie, & prof tools on Digital UNIX, used to find
        performance problems.  The Heap Analyzer provides an easy-to-use,
        graphical user interface for the Third Degree tool on Digital UNIX,
        used to find the causes of memory corruption, memory leaks, and
        uses of uninitialized data.  The Man Page Browser provides an 
        easy-to-use tool for viewing man pages, including hyperlinks to
        related man pages.  You must be running Digital UNIX V4.0 or higher 
        to use the Graphical Program Analysis Tools.

        The initial GPA toolset consists of three standalone tools: Profiler, 
        Heap Analyzer, and Man Page Browser.  If you are running the Common 
        Desktop Environment (CDE), you can click on the GPA icon to display 
        individual icons for each of the three tools.


-Jeff
3603.5PADC::KOLLINGKarenWed Jun 04 1997 20:324
    I'm using atom.  This is very helpful, thanks.  Two bugs in
    my program, one in another one, and some storage leaks in 
    Iostream...
    
3603.6Use -excobj libcxx.so to ignore libcxx complaintsDECC::SULLIVANJeff SullivanThu Jun 05 1997 14:5919
Re: .5
> some storage leaks in Iostream...

You can use -excobj libcxx.so to ignore problems in libcxx (unless of course,
you work on libcxx). The same is true for libc or any other "third party"
library that you may have no control over.

If you think the problems in Iostream are real, you could post them here.

See man atom(1) for details.

> I'm using atom.  This is very helpful, thanks.

Tell two friends!

Also, try GPA (dxheap/dxprof). If you like third/hiprof, you should really like
these!

-Jeff