Professional Web Applications Themes

Using udk 8, freestore (fs) and STL - SCO

Has anyone tried using freestore (fs) on UnixWare? It's a tool which helps find memory leaks. It's part of UDK One should first instrument the code (at compilation phase) with the compiler flag "-f" At this phase, only test/toy source file pass. Our own source gives the following: CC -f: Sorry, not implemented: line 18 /usr/include/CC/memory: In "operator new(args)", there are placement new arguments, or size-expr contains a comma. make: *** [genie_connection.o] Error 1 Each time I use an STL container I get this error. /usr/include/CC/memory is a STL source file. btw, even when trying only to create a preprocessed ...

  1. #1

    Default Using udk 8, freestore (fs) and STL

    Has anyone tried using freestore (fs) on UnixWare?

    It's a tool which helps find memory leaks. It's part of UDK

    One should first instrument the code (at compilation phase) with the
    compiler flag "-f"

    At this phase, only test/toy source file pass.

    Our own source gives the following:

    CC -f: Sorry, not implemented: line 18 /usr/include/CC/memory: In "operator
    new(args)", there are placement new arguments, or size-expr contains a
    comma.
    make: *** [genie_connection.o] Error 1

    Each time I use an STL container I get this error.
    /usr/include/CC/memory is a STL source file.
    btw, even when trying only to create a preprocessed file "-E", it gives the
    same error as above.
    Later on one should link with "-lfs" (which means, it's not a symbol
    collision issue)

    References (on UnixWare):
    man -s C++ fs



    Regards,

    Alon Blayer-Gat


    Alon Guest

  2. #2

    Default Re: Using udk 8, freestore (fs) and STL

    "Alon Blayer-Gat" <com> wrote in message news:<bnjf4o$ele$att.net.il>... 

    fs will work for a lot of C++ sources, but once you get into
    the STL headers, it tends to fall down.

    If you are on UnixWare 7.1.3, try using the new "memtool" memory
    checking tool. This is more general and robust than "fs", and
    will flag various kinds of memory errors. See
    http://uw713doc.sco.com/en/man/html.1/memtool.1.html
    for the full details.

    Jonathan Schilling
    J. Guest

  3. #3

    Default Re: Using udk 8, freestore (fs) and STL

    Hi,

    I'm using UW 7.1.1.
    Is thier another workaround.

    Alon

    "J. L. Schilling" <com> wrote in message
    news:google.com... 
    news:<bnjf4o$ele$att.net.il>... 
    >
    > fs will work for a lot of C++ sources, but once you get into
    > the STL headers, it tends to fall down.
    >
    > If you are on UnixWare 7.1.3, try using the new "memtool" memory
    > checking tool. This is more general and robust than "fs", and
    > will flag various kinds of memory errors. See
    > http://uw713doc.sco.com/en/man/html.1/memtool.1.html
    > for the full details.
    >
    > Jonathan Schilling[/ref]


    Alon Guest

  4. #4

    Default Re: Using udk 8, freestore (fs) and STL

    "Alon Blayer-Gat" <com> wrote in message news:<bnlg68$ggi$att.net.il>... 

    [Sorry for the post but your above mail isn't working (quota exceeded).]

    We have made a quick patch to the "fs" tool to allow it
    to get past the error you were getting on the <memory> header.

    Do anonymous ftp to ftpput.sco.com, go to the tmp/fs-patch/
    directory, download the fsipp executable, and move it into
    /usr/ccs/lib/ (saving the old one that was there).

    Let us know if you have other problems past this first one.

    As stated originally, the best approach is to upgrade to UW 7.1.3
    (for your development platform, doesn't have to be for all your
    deployment platforms), and then use "memtool".

    Jonathan Schilling
     
    > news:<bnjf4o$ele$att.net.il>... 
    > >
    > > fs will work for a lot of C++ sources, but once you get into
    > > the STL headers, it tends to fall down.
    > >
    > > If you are on UnixWare 7.1.3, try using the new "memtool" memory
    > > checking tool. This is more general and robust than "fs", and
    > > will flag various kinds of memory errors. See
    > > http://uw713doc.sco.com/en/man/html.1/memtool.1.html
    > > for the full details.
    > >
    > > Jonathan Schilling[/ref][/ref]
    J. Guest

  5. #5

    Default Re: Using udk 8, freestore (fs) and STL

    Hi,

    Thank you,

    It works fine with STL in a test code.

    But, I'm also using the ACE library, so added a Reactor instance to my test
    code (A dispatch mechanism):

    In compilation with -f I get the following warnings:

    "/usr/include/netinet/in.h", line 339: warning: declaration of a member with
    the same name as its class

    char ip_opts[40];

    ^

    "/usr/include/sys/sockio.h", line 94: warning: linkage specification is
    incompatible with previous "ioctl" (declared at line 261 of
    "/usr/include/unistd.h")

    static int ioctl(int __a1, int __a2, ...)

    In linkage with -lfs -l++, I get the following errors:

    Undefined first referenced

    symbol in file

    ACE_Select_Reactor_T<T1>::~ACE_Select_Reactor_T<AC E_Select_Reactor_Token_T<A
    CE_Token>>(void) [with T1=ACE_Select_Reactor_Token_T<ACE_Token>] test.o

    UX:ld: ERROR: Symbol referencing errors. No output written to
    /mvobs//SMSC/genie/bin/x86at.UDK.8/test

    Any ideas ?

    Best Regards,

    Alon Blayer-Gat

    "J. L. Schilling" <com> wrote in message
    news:google.com... 
    news:<bnlg68$ggi$att.net.il>... 
    >
    > [Sorry for the post but your above mail isn't working (quota exceeded).]
    >
    > We have made a quick patch to the "fs" tool to allow it
    > to get past the error you were getting on the <memory> header.
    >
    > Do anonymous ftp to ftpput.sco.com, go to the tmp/fs-patch/
    > directory, download the fsipp executable, and move it into
    > /usr/ccs/lib/ (saving the old one that was there).
    >
    > Let us know if you have other problems past this first one.
    >
    > As stated originally, the best approach is to upgrade to UW 7.1.3
    > (for your development platform, doesn't have to be for all your
    > deployment platforms), and then use "memtool".
    >
    > Jonathan Schilling

    > > news:<bnjf4o$ele$att.net.il>... [/ref][/ref]


    Alon Guest

  6. #6

    Default Re: Using udk 8, freestore (fs) and STL

    "Alon Blayer-Gat" <com> wrote in message news:<bo2lja$iac$att.net.il>... 

    Some of the UnixWare networking headers have usages that the C++ compiler
    warns about, although they cause no harm. Normally these warnings are
    suppressed, since there's nothing a user can do about system headers.

    However, when compiling with -f, the source code is preprocessed and
    instrumented, and the offending usages now look like they occur in
    user code, not system headers. Hence the warnings appear. You can
    ignore them.
     

    Same as above.
     

    This looks like a template instantiation issue unrelated to using "fs".
    (If you don't compile or link with "fs", do you still get this?)

    What CC template instantiation options are you using? Are you creating
    an archive, in which case you need to use CC -Tprelink_objects? Are you
    using the default auto instantiation mechanism? Showing your whole
    link command line might help.

    Jonathan Schilling
    J. Guest

  7. #7

    Default Re: Using udk 8, freestore (fs) and STL

    Hi,

    1. I'm linking an executable, not a library.
    2. If I remove the '-f' from the linkage phase, linkage error does not
    reproduce.
    Never the less every object (but main() (test.cc) itself is insrumented
    with -f)
    If this points out that I'll be able to detect leaks in every source file
    but my main(),
    I can live with it.

    3. My link command:
    CC -DCOMP_SDK -DUNW -DARCH_X86AT_UDK_8 -DXBYTE_ORDER -DTEMPLATE_INLINE= -Tlo
    cal -Kpentium_pro -DTEMPLATE_DECL=template\<\> -Wf,--diag_suppress -Wf,9 -I/
    mvobs/general/code/inc/x86at.UDK.8 -I. -I../inc -I/mvobs//SMSC/genie/.export
    _inc -I/mvobs/ACE/x86at.UDK.8/.export_inc -I/mvobs/INFRA/.export_inc -I/
    mvobs/SMSC/api/.export_inc -I/mvobs/SMSC/ei/main/.export_inc -I/mvobs/SMSC
    /shared/.export_inc -I/mvobs/freeware/.export_inc -I/mvobs/general/.export
    _inc -I/mvobs/RW/src -g -DDBG_LIB=\"genie\" -DNYHASH_DEBUG -o
    /mvobs//SMSC/genie/bin/x86at.UDK.8/test test.cc
    /mvobs//SMSC/genie/lib/x86at.UDK.8/genie.a
    /mvobs/SMSC/ei/main/lib/x86at.UDK.8/ei-main.a
    /mvobs/SMSC/api/lib/x86at.UDK.8/api.a /mvobs/INFRA/lib/x86at.UDK.8/tools.a
    /mvobs/INFRA/lib/x86at.UDK.8/comm.a /mvobs/INFRA/lib/x86at.UDK.8/events.a
    /mvobs/INFRA/lib/x86at.UDK.8/adt.a /mvobs/INFRA/lib/x86at.UDK.8/debug.a
    /mvobs/INFRA/lib/x86at.UDK.8/comp.a
    /mvobs/ACE/x86at.UDK.8/lib/x86at.UDK.8/ace.a
    /mvobs/ACE/x86at.UDK.8/lib/x86at.UDK.8/ace_ssl.a
    /mvobs/freeware/lib/x86at.UDK.8/ssl.a
    /mvobs/freeware/lib/x86at.UDK.8/crypto.a -lsocket -lnsl -lm -lcrypt -ldl -lg
    en -Kthread -L/usr/local/oracle/v8.1.7/lib -lclntsh -lwtc8 -R/usr/local/orac
    le/v8.1.7/lib -lx25 -lfs -l++


    Best Regards,
    Alon Blayer-Gat




    Alon Guest

  8. #8

    Default Re: Using udk 8, freestore (fs) and STL

    With my real main() it still does not work although i removed the -f flag

    Here is my link command:
    CC -DCOMP_SDK -DUNW -DARCH_X86AT_UDK_8 -DXBYTE_ORDER -DTEMPLATE_INLINE= -Tlo
    cal -Kpentium_pro -DTEMPLATE_DECL=template\<\> -Wf,--diag_suppress -Wf,9 -I/
    mvobs/general/code/inc/x86at.UDK.8 -I. -I../inc -I/mvobs//SMSC/genie/.export
    _inc -I/mvobs/ACE/x86at.UDK.8/.export_inc -I/mvobs/INFRA/.export_inc -I/
    mvobs/SMSC/api/.export_inc -I/mvobs/SMSC/ei/main/.export_inc -I/mvobs/SMSC
    /shared/.export_inc -I/mvobs/freeware/.export_inc -I/mvobs/general/.export
    _inc -I/mvobs/RW/src -g -DDBG_LIB=\"genie\" -o
    /mvobs//SMSC/genie/bin/x86at.UDK.8/genie_ei genie_ei.cc
    /mvobs//SMSC/genie/lib/x86at.UDK.8/genie.a
    /mvobs/SMSC/ei/main/lib/x86at.UDK.8/ei-main.a
    /mvobs/SMSC/api/lib/x86at.UDK.8/api.a /mvobs/INFRA/lib/x86at.UDK.8/tools.a
    /mvobs/INFRA/lib/x86at.UDK.8/comm.a /mvobs/INFRA/lib/x86at.UDK.8/events.a
    /mvobs/INFRA/lib/x86at.UDK.8/adt.a /mvobs/INFRA/lib/x86at.UDK.8/debug.a
    /mvobs/INFRA/lib/x86at.UDK.8/comp.a
    /mvobs/ACE/x86at.UDK.8/lib/x86at.UDK.8/ace.a
    /mvobs/ACE/x86at.UDK.8/lib/x86at.UDK.8/ace_ssl.a
    /mvobs/freeware/lib/x86at.UDK.8/ssl.a
    /mvobs/freeware/lib/x86at.UDK.8/crypto.a -lsocket -lnsl -lm -lcrypt -ldl -lg
    en -Kthread -L/usr/local/oracle/v8.1.7/lib -lclntsh -lwtc8 -R/usr/local/orac
    le/v8.1.7/lib -lx25 -lfs -l++

    Regards,
    Alon


    Alon Guest

  9. #9

    Default Re: Using udk 8, freestore (fs) and STL

    > This looks like a template instantiation issue unrelated to using "fs". 

    Yes, without the -lfs -l++ it links fine



    Alon Guest

  10. #10

    Default Re: Using udk 8, freestore (fs) and STL

    I'm using -Tlocal in both compilation and later on in linkage.
    I have changed it to -Tused.
    Errors are gone but I'm not sure that program will work as it should.

    Alon


    Alon Guest

  11. #11

    Default Re: Using udk 8, freestore (fs) and STL

    "Alon Blayer-Gat" <com> wrote in message news:<boaeho$dhm$att.net.il>... 

    From other posts, your application is a bunch of .a archives pulled in
    by one .cc main program.

    The best approach is to compile all the source files that go into
    the .a's with -Tauto (the default), and not either -Tlocal or -Tused.

    Then do a CC -Tprelink_objects on all the .o's that are going into a
    particular archive, before doing the "ar" command to create the archive.

    Then compile the main program with the default -Tauto as well.
    Then link.

    If you take this approach, does it link correctly, with and without
    using "fs"?

    Jonathan Schilling
    J. Guest

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139