Core dump using iostream with Sun Studio 8

I'm running on Solaris 9 using C++ compiler Sun Studio 8, and encoutered a very strange problem.
My application failed with a core and here is the stack.
[1] t_splay(0x3774b470, 0x387a0ec0, 0x389aec60, 0x39e5ef1f, 0x3774b470, 0x1), at 0xfc347930
[2] t_delete(0x387a0ec0, 0x80, 0x39be9748, 0x20, 0x383ccd20, 0x0), at 0xfc347698
[3] mallocunlocked(0x80, 0x0, 0x21b08, 0xfc3bc000, 0x10, 0x20), at 0xfc346d40
[4] malloc(0x80, 0xfbaa7400, 0x1, 0x759c40, 0x0, 0x0), at 0xfc346b74
[5] operator new(0x80, 0x0, 0xd3a18, 0x759c74, 0x0, 0x8345fc), at 0x760c10
[6] strstreambuf::overflow(0xf41f6e28, 0x29, 0xf41f6e28, 0x39fe0e88, 0x39fe0e88, 0x8345fc), at 0x75bb1c
[7] streambuf::xsputn(0xf41f6e28, 0xfee00bc0, 0x1, 0x0, 0x81010100, 0x1), at 0x75ab94
[8] unsafe_ostream::outstr(0xf41f6e78, 0xfee00bbf, 0x0, 0x0, 0xf41f6e7c, 0xfffffffe), at 0x757bac
=>[9] unsafe_ostream::operator<<(this = 0xf41f6e78, _s = 0xfee00bbf ")"), line 1211 in "iostream.h"
[10] ostream::operator<<(this = 0xf41f6e74, _s = 0xfee00bbf ")"), line 1350 in "iostream.h"
[11] CorInterfaceEntity::ifState(this = 0x1bc3de78, newState = MISMATCH_OF_INSTALLED_AND_EXPECTED, needToSendEvent = false
Can somebody help me giving a direction of investigation ?
Is there perhaps known problem with iostream on Sun Studio 8 running on Solaris 9 ?
Thanks for any tips.
Yaakov Berkovitch
[email protected]

But sorry for my insistence, but do you think that
purify or/and runtime are not able to detect any
corruption of the heap ?They can detect some kinds of corruption, such as some uses of an invalid pointer.
But a wild pointer that changes the value of data that is part of your program cannot be detected by RTC or Purify. Those programs can't know whether that change is intentional.
>
BTW, we are not using any volatile declaration, and weIf non-local data is shared among threads, it should be declared volatile. For example, suppose you have
x = foo;
... // code not changing foo
y = foo;
If foo is not marked volatile, the compiler is allowed to assume its value hasn't changed, and assign to y the same value assigned to x. If foo was changed by another thread, y will not have the current value of foo. The "volatile" declaration says that the variable's value might change without any obvious reason, and the compiler should generate code to load a fresh value each time it is referenced.
are using the rwtools library packaged with the
compiler, and are not using the STD library.OK, you are not running into a std::string synchronization bug.
>
Also about the compiler option -xarch=v8, is probably
not relevant for us because we are running Solaris 9.
So the relevant compiler is probably -xarch=v9. Do you
advise us using this option ?I think you misunderstand. The -xarch values refer to the kind of processor your program will run on.
The -xarch=v8 option generates 32-bit code that will run on all SPARC chips, including the chips found in very old SPARCstations. This option is the default for compilers prior to Sun Studio 9 (which ships this week).
The -xarch=v8plus option generates 32-bit code that runs only on UltraSPARC chips, found in Ultra workstations. These are the only kinds of workstations shipped by Sun since about 1996. Unless you need to support the ancient SPARCstations, we recommend compiling with -xarch=v8plus, to get smaller and faster code.
The -xarch=v9 option generates 64-bit code that runs only on UltraSPARC chips, an only on Solaris 7 or later. Unless your program requires a very large address space, you generally don't want to generate 64-bit code. On SPARC, 64-bit code is larger and slower than 32-bit code. (Type "long" and all pointers are 64 bits instead of 32 bits.)
>
Also I want to return you two new questions:
1) I read in another discussion,
http://forum.sun.com/thread.jsp?forum=5&thread=18124&me
sage=47854#47854
that another memory manager can be more efficient in
multi-threaded environment (libmtmalloc.so), and also
an alternate threads library (/usr/lib/lwp) that
reduced CPU usage. Do you advice us using this
alternate library ?The libmtmalloc library usually has better performance in MT programs than the default version of malloc. It also can result in more memory fragmentation. In that case, the larger working set can sometimes have a large negative effect, more than offsetting the MT efficiency. You have to experiment to see whether it is appropriate for your particlular program. If you are running into heap corruption, the pattern of corruption will probably be different with libmtmalloc than with the default malloc. The differences might provide a clue to what is wrong.
The alternative "T2" threads library was introduced in Solaris 8 as an option.
In Solaris 9 it is the default, so you are already using it.
>
2) We are using the Rogue Wave library shiped with the
compiler. Is it an up-to-date version ? Can we assume
that is a good choice or it will be preferable to move
to the STD library ?I assume you mean Rogue Wave Tools.h++. As explained in the compiler docs, this version of Tools is obsolete, and has not been supported for many years. We continue to provide it for customers who used it before the introduction of the C++ Standard Library in 1998, and who don't want to change their code. We do not recommend it for use in new code.

Similar Messages

  • Is it possible to integrate j2ee enviroment with sun studio developer???

    Dear all,
    I currently developing a jsp based web application with sun studio enterprise but sun studio by default does not support j2ee environment, i think it only support to j2SE.
    i want to use persistence and enterprise beans with my application but don't know, how to do it with sun studio developer.
    i can install the persistence and ejb api's separately, but i dont know whether sun developer will support them
    Can any on tell, what is the best tool for web application developement, while i will need to java uml diagrams later on.
    i would be grateful, if someone can help, i am really desprate
    shafqat zaman

    Sun Java Studio Enterprise 8.1 (built on top on NetBeans 5.0) does support j2ee (and j2se) development.
    For developing j2ee applications, both NetBeans (latest version is 5.5, http://www.netbeans.org) and SJSE can be used. For a comparison on SJSE and NetBeans, please take a look at:
    http://forum.java.sun.com/thread.jspa?forumID=747&threadID=5113472
    For a list of all development tools from Sun, please take a look at http://developers.sun.com/prodtech/devtools/free/index.html..
    i want to use persistence and enterprise beans with my application but don't know,
    how to do it with sun studio developer.For j2ee development, please check out NetBeans 5.5 ; there are several tutorials available at http://www.netbeans.org/kb/index.html. (Since SJSE is built on top on NetBeans, SJSE can also be used and all the NetBeans documents also will apply to SJSE).

  • Problems with sun studio 12 in suse linux 11

    Hi.
    I installed Sun Studio 12 suse linux with no problems. However, the debugging modules (DBX) are not working any more. When I started Sun Studio, it gave a message about modules that could not be loaded in tha moment. I did not pay attention. But I noticed that all debugging options were disabled.
    Using the module manager, I saw the DBX module was not checked, and I could not change it. I was marked with a red X. So I thought to reinstall the application. However, the uninstall utility doesn't work either.
    According with the documentation, running ./uninstaller does it, but I get the following error message instead
    Exception in thread "main" java.lang.NoClassDefFoundError: uninstall_Sun_Studio_12/class
    Caused by: java.lang.ClassNotFoundException: uninstall_Sun_Studio_12.class
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    I tried to uninstall manually, and then execute installer, by using first the software manager in linux and deleting the producregistry file manually. It worked because I executed the installer. However, in Sun Studio IDE, debugging options are still not available despite I "reinstalled" the application. I checked the log files and they say the file uninstall_Sun_Studio_12.class could not be written.
    So my questions are:
    1. Is there any other way to repair Sun Studio? What could be the possible for this module to stop working?
    2. Does anyone have an idea of why the installer cannot write the uninstaller class?
    I found that perhaps problems regarding Java / Netbeans versions could be the problem, but the ones I have installed are those packages that were installed along with Sun Studio, and both are valid.
    Thank you very much.

    Perhaps you can simply delete the Sun Studio 12 installation tree, because it will not work on SUSE Linux 11.
    This OS is not supported, so any problems you see with SS12 on SUSE 11 will not be fixed.
    But we have a newer version, that should work better.
    You can try to download and install Sun Studio Express 2008/11 (extract pre-installed image from tar.bz2 file).
    Here is a pointer to the web page:
    http://developers.sun.com/sunstudio/downloads/express
    All you need is to provide a email address, and press "Download Now" button.
    You will see a page, that gives you 2 options to download Sun Studio Express 2008/11.
    Use "Option 2": Download Tarfile Installer
    Thanks,
    Nik

  • Compiling MySQL 5.1.26-rc with Sun Studio Express on Linux?

    I managed to compile MySQL 5.1.26-rc with Sun Studio Express on Linux (OpenSuse 10.2 on x64), but I get unexpected crashes every time a connection thread exits:
    (gdb) where
    #0  0x00002b2ce0649535 in raise () from /lib64/libc.so.6
    #1  0x00002b2ce064a990 in abort () from /lib64/libc.so.6
    #2  0x00002b2cdf949795 in __pthread_unwind () from /lib64/libpthread.so.0
    #3  0x00002b2cdf944425 in pthread_exit () from /lib64/libpthread.so.0
    #4  0x00000000005048b2 in one_thread_per_connection_end (thd=0x16d88f0, put_in_cache=false)
    at /home/mysql/debug/sql//mysqld.cc:1893
    #5  0x0000000000513b75 in handle_one_connection (arg=0x16d88f0) at /home/mysql/mysql-5.1.26-rc/sql//sql_connect.cc:1122
    #6  0x00002b2cdf94309e in start_thread () from /lib64/libpthread.so.0
    #7  0x00002b2ce06da4cd in clone () from /lib64/libc.so.6
    #8  0x0000000000000000 in ?? ()If I compile with gcc using e.g. BUILD/compile-amd64-debug-max, I have no issue! But I want to use Sun Studio in order to be consistent with the Solaris version, and also because Sun Studio is likely to produce better code.
    Here is the compilation script, it downloads and extracts the source tree and builds it (it assumes Sun Studio Express is installed in /opt/sun):
    #!/bin/bash
    export PATH=/opt/sun/sunstudioceres/bin:$PATH
    wget -q http://mir2.ovh.net/ftp.mysql.com/Downloads/MySQL-5.1/mysql-5.1.26-rc.tar.gz
    tar xpf mysql-5.1.26-rc.tar.gz
    cd mysql-5.1.26-rc
    # Explicitly specify libs to avoid linking with the STL.
    export LIBS="-xnolib -lCrun -lm -lc -lrt"
    autoreconf --force --install > autoreconf.log 2>&1
    export MY_FLAGS="-g -mt -xtarget=generic -m64"
    CC=cc CXX=CC CFLAGS=$MY_FLAGS CXXFLAGS=$MY_FLAGS ./configure --with-big-tables --without-embedded-server --disable-shared --with-pthread --with-ssl -with-plugins=max > configure.log 2>&1
    gmake -j > build.log 2>&1Any idea about what is going wrong?
    Thanks.

    Possibly the actual CC (or cc) command lines are not correct. The proper way to say not to link libCstd is the command-line option -library=no%Cstd. Then you don't need to add the default system libraries like -lc to the command line.
    Can you show the actual CC command lines that are generated by the makefile? They should be in the compilation log. I'd also like to see the command line(s) used to create dynamic libraries, if any, and the final executable.

  • Is it possible to run sun studio 12 ide with sun studio 8 compiler?

    Hi, i am in the process of evaluating sun studio 12. Our company cannot move to sun studio 12 compiler collection right now as it is a huge code base and it will take us few months even before we start using sun studio 12 compiler in our development environment. Is it possible to use sun studio 12 ide with sun studio 8 compiler collection(CC, dbx etc)? Your feedback is appreciated. thank you.

    There are two parts to the answer.
    1) whether you can
    To choose a compiler set follow Tools->Options->C/C++
    and in the BuildTools tab you'll see how it picks up
    compilers from your PATH.
    This dialog doesn't govern choice of dbx, which will always
    come from the installation. However you can alter which dbx
    is used by presetting the environment variable SPRO_DBX_PATH
    to teh full pathname of a dbx of your choice.
    2) whether you should
    The IDE should work reasonably well with older compilers. They
    are not that tightly bound.
    The IDE will not work well enough with an older dbx, especially as
    old as studio 8. However, while not officially supported or tested
    the SS12 dbx should be reasonably bwd compatible with code
    generated from older compilers.
    So my recommendation is: don't use SPRO_DBX_PATH and
    give the old compilers a try.

  • Trouble viewing disassembly with Sun Studio 11

    I was wondering how someone can bring up a window with a program�s disassembly when debugging a C program with Sun Studio 11. (SPARC). I would like to be able to set breakpoints at specific assembly instructions using Sun Studios�s GUI interface rather than using typed commands with DBX. I would also like to know how to get a window that shows the current value of the registers. Any help would be greatly appreciated.
    Chris

    Oops, it appears that you can't set breakpoints
    through Disassembler window, it just shows the code
    and current position within the code, that's all.It
    gives you better view of context than dbx's 'dis' or
    'list -i' commands, though.Actually you can set breakpoints through Disassembler window:
    - select an address, click right mouse button to open context menu
    - choose "Set Breakpoint"
    If you need this feature, please file an RFE (Request
    For Enhancement) through bugs.sun.comThe Disassembler window has been significantly improved between
    EA1 and FCS. Now users can set and delete breakpoints using the
    same way as they do in source file - click on the left gray area (toggle
    breakpoints). Also Disassembler window has "Step Into", "Step Over",
    "Step Out" and "Run To Cursor" buttons.
    Thanks,
    Nik

  • Using boost::thread with Sun Studio C++ gives error

    Hi,
    I'm trying to compile a code which uses the boost thread library, but I get the following error:
    CC -library=stlport4 -features=tmplife -features=tmplrefstatic -mt -c -o t t.cpp
    "/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/detail/thread.hpp", line 344: Error: boost::thread::thread(boost::thread&) is not accessible from boost::move(boost::detail::thread_move_t<boost::thread>).
    "/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
    5 Error(s) detected.
    make: *** [t] Error 5the sample source code in question here just a single include:
    #include <boost/thread.hpp>This is with boost 1.40.0. I wonder what I'm doing wrong..
    Akos

    OK, I tried latest version of CC from Sun Studio 12 update 1 and can say that
    - the error about constructor not being accessible is Sun C++ compiler "feature" (only called feature because it existed for so long) that allows binding of rvalues to non-const references; this "feature" will probably be turned off in the next release. It can't be changed in a patch because client's code might rely on it.
    - the other errors are also not Boost-specific: the result of incompatibility of Linux headers and Sun C++ compiler; more thorough investigation is due, but in the past we had several problems like this. This particular can be solved by adding
    -D_GNU_SOURCE to compile line.

  • Weblogic Core Dumps on Solaris with Hotspot Server VM

    For Sun Microsystems SPARC with Solaris 2.7 the supported platform is
    "SunSoft SDK 1.3.1 JavaTM 2 Runtime Environment, Standard Edition (build
    1.3.1-b24) Java HotSpotTM Server VM (build 1.3.1-b24, mixed mode)"
    We have set the MaxPermSize as specified below and are still receiving
    periodic core dumps in a production environment. The most recent of which
    is "Unexpected Signal : 11 occurred at PC=0xee4b5d00 Function
    name=JVM_CurrentTimeMillis" a reported bug on Sun's bug parade (Bug Id
    #4488864). Are there some other settings that we should try? Is there a
    more stable VM we should be using like "SunSoft SDK 1.3.0 JavaTM 2 Runtime
    Environment, Standard Edition (build 1.3.0) "?
    Help would be appreciated,
    Thanks
    Problems with JDK 1.3 crashing
    If you have problems with OutOfMemory errors and the JVM crashing with JDK
    1.3, try setting: -XX:MaxPermSize=128m. There is currently an open bug on
    Sun's bug parade that describes this problem. See,
    http://developer.java.sun.com/developer/bugParade/bugs/4390238.html

    FYI: Stability seems to have been achieved by setting:
    -XX:MaxNewSize=64m
    -XX:MaxPermSize=128m
    "Paul Hamill" <[email protected]> wrote in message
    news:[email protected]..
    Unfortunately we tried switching to client and we still periodically getthe
    core dumps.
    "Dimitri Rakitine" <[email protected]> wrote in message
    news:[email protected]..
    I'd be interested to know this as well - so far the only stable option
    that I know of is to use client JVM. Server Hotspot crashes, sooner
    or later. 1.3.1-b24 server crashes as well, but not the client JVM.
    Paul Hamill <[email protected]> wrote:
    For Sun Microsystems SPARC with Solaris 2.7 the supported platform is
    "SunSoft SDK 1.3.1 JavaTM 2 Runtime Environment, Standard Edition
    (build
    1.3.1-b24) Java HotSpotTM Server VM (build 1.3.1-b24, mixed mode)"
    We have set the MaxPermSize as specified below and are still receiving
    periodic core dumps in a production environment. The most recent of
    which
    is "Unexpected Signal : 11 occurred at PC=0xee4b5d00 Function
    name=JVM_CurrentTimeMillis" a reported bug on Sun's bug parade (Bug Id
    #4488864). Are there some other settings that we should try? Is
    there
    a
    more stable VM we should be using like "SunSoft SDK 1.3.0 JavaTM 2Runtime
    Environment, Standard Edition (build 1.3.0) "?
    Help would be appreciated,
    Thanks
    Problems with JDK 1.3 crashing
    If you have problems with OutOfMemory errors and the JVM crashing with
    JDK
    1.3, try setting: -XX:MaxPermSize=128m. There is currently an open bugon
    Sun's bug parade that describes this problem. See,
    http://developer.java.sun.com/developer/bugParade/bugs/4390238.html
    Dimitri

  • Sigsegv accessing va_arg with Sun Studio 12 Update 1 on OpenSolaris 2009.06

    $ uname -a
    SunOS ultra 5.11 snv_111b i86pc i386 i86pc Solaris
    $ cc -V
    cc: Sun C 5.10 SunOS_i386 2009/06/03
    usage: cc [ options] files. Use 'cc -flags' for details
    $ cat testva.c
    #include <stdarg.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    static void local_vformatter(char *buf, size_t len,
    const char *format, va_list ap)
    char *str;
    ssize_t bigval;
    str = va_arg(ap, char *);
    printf("arg %s\n", str);
    str = va_arg(ap, char *);
    printf("arg %s\n", str);
    bigval = va_arg(ap, /* ssize_t */ unsigned long);
    printf("arg %lld\n", bigval);
    str = va_arg(ap, char *);
    printf("arg %s\n", str);
    static void local_snprintf(char *buf, size_t len,
    const char *format, ...)
    va_list ap;
    va_start(ap, format);
    local_vformatter(buf, len, format, ap);
    va_end(ap);
    int main(void)
    char buf[800];
    char key, val;
    ssize_t len;
    key = "KEY1";
    val = "VAL1";
    len = strlen(key);
    local_snprintf(buf, sizeof buf, "%sKey %s (%ld) Value %s\n",
    "->",
    key,
    len,
    val);
    /* printf(buf); */
    $ cc -m64 -O0 -g testva.c
    $ ./a.out
    arg ->
    arg KEY1
    arg 4
    Segmentation Fault (core dumped)
    $ dbx ./a.out core
    Reading a.out
    core file header read successfully
    Reading ld.so.1
    Reading libc.so.1
    program terminated by signal SEGV (no mapping at the fault address)
    Current function is local_vformatter
    21 str = va_arg(ap, char *);
    (dbx) where
    =>[1] local_vformatter(buf = 0xfffffd7fffdff510 "°õßÿ^?ýÿÿ^H÷ßÿ^?ýÿÿ", len = 800U, format = 0x4011d0 "%sKey %s (%ld) Value %s\n", ap = 0xfffffd7fffdff4a8), line 21 in "testva.c"
    [2] local_snprintf(buf = 0xfffffd7fffdff510 "°õßÿ^?ýÿÿ^H÷ßÿ^?ýÿÿ", len = 800U, format = 0x4011d0 "%sKey %s (%ld) Value %s\n", ... = 0x4010c8, ...), line 31 in "testva.c"
    [3] main(), line 49 in "testva.c"
    (dbx) regs
    current frame: [1]
    r15     0x0000000000000000
    r14     0x00000000004011f0
    r13     0x0000000000000004
    r12     0x00000000004011f8
    r11     0x0000000000000246
    r10     0x0000000000000000
    r9     0xfffffd7fff35afa0
    r8     0x00000000ffdff4e8
    rdi     0xfffffd7fffdff4e0
    rsi     0x00000000ffdff4e0
    rbp     0xfffffd7fffdff3c0
    rbx     0xfffffd7fffdff4a8
    rdx     0x00000000ffdff4e0
    rcx     0xfffffd7fff2c463a
    rax     0xfffffd7fffdff4a8
    trapno     0x000000000000000e
    err     0x0000000000000004
    rip     0x0000000000400f65:local_vformatter+0x249 movq (%rsi),%rsi
    cs     0x0000000000000053
    eflags     0x0000000000010212
    rsp     0xfffffd7fffdff2f0
    ss     0x000000000000004b
    fs     0x0000000000000000
    gs     0x0000000000000000
    es     0x0000000000000000
    ds     0x0000000000000000
    fsbase     0xfffffd7fff1a2a00
    gsbase     0x0000000000000000
    (dbx)
    It looked to me that the top 32 bits of rsi got whacked somehow.
    AFAICT, it only occurs with "-O0". Omit -O0, or use -O1, -O2, etc. and it works.
    The simple code above is based on the same issue in critical Apache Portable Runtime code (apr_snprintf() et al) that renders APR useless for httpd and probably many other apps.

    Your code won't compile as shown. I suspect that the source code has been munged by the forum display formatter, because it was not enclosed in "code" brackets.
    Here is what I think your example looked like: #include <stdarg.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    static void local_vformatter(char* buf, size_t len,
    const char *format, va_list ap)
        char *str;
        ssize_t bigval;
        str = va_arg(ap, char*);
        printf("arg %s\n", str);
        str = va_arg(ap, char*);
        printf("arg %s\n", str);
        bigval = va_arg(ap, /*ssize_t*/ unsigned long);
        printf("arg %lld\n", bigval);
        str = va_arg(ap, char*);
        printf("arg %s\n", str);
    static void local_snprintf(char* buf, size_t len,
    const char *format, ...)
        va_list ap;
        va_start(ap, format);
        local_vformatter(buf, len, format, ap);
        va_end(ap);
    int main()
        char buf[800];
        char *key, *val;
        ssize_t len;
        key = "KEY1";
        val = "VAL1";
        len = strlen(key);
        local_snprintf(buf, sizeof buf, "%sKey %s (%ld) Value %s\n",
        "->", key, len, val);
        printf(buf);
    } I was able to reproduce your problem only with -O0, as you found.
    The short answer is, don't use -O0. It serves no useful purpose, except for compiler testing.
    Either use no -O option, best for debugging, or use -O2 or above to get optimization.
    If you would like to see a fix for this problem, please file a bug report at
    [http://bugs.sun.com]

  • Poor performance of string::append on Solaris 10 with Sun Studio 10

    I found string::append(size_type num, char ch) of libCstd consumes too much cpu time comparing with stlport. Anybody knows if this is a known issue on Solaris 10 and Sun Studio 10? Or if I need to use special build options to build with libCstd?
    For example: a.c
    #include <iostream>
    #include <time.h>
    using namespace std;
    int main()
      string ss;
      for ( i=0; i<60000; i++)
        ss.append(1, 'A');
      cout << clock();
      cout << endl;
      return 0;
    }Build with libCstd:
    CC a.c -o a1
    Build with stlport:
    CC -library=%none -library=stlport4 a.c -o a2
    a1 outputs: 10000
    a2 outputs: 1900000
    You can see how big different they have. I am sure their running environment is same.

    I suspect this is due to a bug in libCstd that manifests itself by reallocating the string for each append. Compile and run the program below:
    #include <string>
    #include <new>
    #include <stdlib.h>
    int in_main;
    void* operator new (size_t nbytes) throw (std::bad_alloc) {
    if (in_main) printf ("operator new (%zu)\n", nbytes);
    return malloc (nbytes);
    void operator delete (void *p) throw () {
    if (in_main) printf ("operator delete (%p)\n", p);
    free (p);
    int main () {
    in_main = 1;
    std::string ss;
    for (int i = 0; i < 256; i++) {
    printf ("append(1, 'A')\n");
    ss.append (1, 'A');
    in_main = 0;
    }

  • How to use Webui with Sun RI?

    Hi All,
    I am using Sun RI for my JSF application, Please tell me how to configure and use the WebUI taglibs in my applicaton(I am using Eclipse as IDE) / pls give me some useful links describing the topic.
    Thanks
    Renju Thomas.

    Thanks BalusC, Thanks for the reply event though my question was with little info,
    I am asking about the tag library using by Sun Studio Creator, Its coming with a rich set of components.
    How can I use the same taglib in my application and my dev environment is in Eclipse.
    Anybody knows the jars and configuration required for that pls give me a reply.
    Thanks
    Renju Thomas.

  • Need help building boost_1_37_0 on Solaris 10 U6 with Sun Studio 12

    Hi,
    Ok, please bear with me here. I've tried many different sets of instructions, and haven't had success with any of them (including the ones at http://blogs.sun.com/sga/category/Boost).
    Operating System: Solaris 10 x86 U6
    Compiler: Sun Studio 12 (SUNCC version 5.9)
    Boost version: 1.37.0
    The ONLY part of boost that I need is regex. I've never built external libraries before and building boost on Solaris seems a rather daunting task. So, could someone please explain, as clearly as possible, how do I build the boost::regex library using SUNCC?
    I know this is a very broad topic, but since I haven't had any luck with any existing instructions that google turns up, alas I am here.
    Thanks in advance if someone can help me,
    ~Slow
    Note: I don't need any special options, any special, non-standard install paths, nothing. Just a straight, stock, boost install.
    Edited by: SlowToady on Nov 10, 2008 2:18 PM

    First, be sure you have the current patches for Sun Studio 12. You can get them here:
    http://developers.sun.com/sunstudio/downloads/patches/
    Please install the current C++ compiler patch, the C compiler patch, and the common back-end compiler patch.
    You should then be able to build BOOST 1.37.0. The only problem I know of has been filed as CR 6767881, which results in an incorrect complaint about a constructor not being accessible. But I don't think that one affects regex.
    If you running into some other problem after patching the compiler, please post enough detail that we can investigate it.
    Questions about how to build just a portion of BOOST are probably best addressed to a BOOST forum.

  • Core dump using OCI HP 32 bit package

    Does any one successfully run OCI application on HP using 32 bit libraries?
    I got core dump at the end of running application, around desctruction part. Following are the statement I got from GDB:
    #0 0xc005db14 in pthread_mutex_destroy+0x18 () from /usr/lib/libpthread.1
    #1 0xc021efd8 in __thread_mutex_free+0x40 () from /usr/lib/libc.2
    #2 0xc0abb4b8 in HPMutexWrapper::~HPMutexWrapper+0x48 () from /usr/lib/libstd_v2.2
    #3 0x613c in std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_C_unlink (this=0x7bff153c) at /opt/aCC/include_std/string:1002
    #4 0xccd0 in ociWrapper::cursor::~cursor (this=0x7bff1538, #free=2) at /vobs/Guru2/IDCE/ociWrapper/ociWrapper.cpp:220
    #5 0x65a8 in main () at /vobs/Guru2/Oracle/HP-UX/sdk/demo/oci_wrapper_insert.cpp:73
    If I build my application in 64 bit using OCI 64 bit package, no problem at all. But I have to make my application work in 32 bit so that I can not simply switch to 64 bit.
    Please give me some help. Thanks.

    I got the problem solved myself. The core dump happens when use OCI 32 bit libraries with STL string. It cores at destroying the STL string.
    Add the option "-mt" to the compile command, the problem will go away.

  • Using devguide in Sun Studio 11?

    Hi!
    Newbie question here: Can I use OpenWindows DevGuide as my GUI builder for my application in the Sun Studio 11 compiler?
    Any help would be appreciated! Thanks!

    My work really is to migrate a GIS application from the Sun Workshop 4.2 Compiler to Sun Studio 11. Since the GUI builder of the application in the old compiler is DevGuide, it also entails changing it to X-Designer.
    I already used the "gil2xd" utility but the GUI in DevGuide is better than that of X-Designer. Another problem is porting from Xview(used in DevGuide) to MOTIF Library(used in X-Designer). There is no one-to-one correspondence between the functions and attributes of the two libraries.
    This is really the remaining and hardest part of the migration process. I was thinking if Xview is compatible with X-Designer so that I could just retain the codes but still get the same results.
    Thank you for all the help, guys!
    Rix

  • -nodisplay bug with Sun Studio 10 for Linux installer

    I'm currently trying to install a trial Sun Studio 10 for Linux on a Fedora Core 3 box. I want the installer to run via the command line, so I use "./installer -nodisplay", but I get the following error message:
    java.lang.UnsatisfiedLinkError: /home/pacey/SS10/.install/jvm_1.4.2/j2re1.4.2_06/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
    libXp is part of the X window system, but I've specified -nodisplay. A non-graphics option shouldn't be trying to load graphics libraries - looks like a bug. Anyway, as I don't have version 6 of that lib on my system, I'm stalled on this. Any suggestions?

    I'm currently trying to install a trial Sun Studio 10 for Linux on a Fedora Core 3 box. I want the installer to run via the command line, so I use "./installer -nodisplay", but I get the following error message:
    java.lang.UnsatisfiedLinkError: /home/pacey/SS10/.install/jvm_1.4.2/j2re1.4.2_06/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
    libXp is part of the X window system, but I've specified -nodisplay. A non-graphics option shouldn't be trying to load graphics libraries - looks like a bug. Anyway, as I don't have version 6 of that lib on my system, I'm stalled on this. Any suggestions?

Maybe you are looking for

  • Problem with Image Trace

    Ok so I used Image Trace on a .jpeg logo. The logo is black rectangle with white text in it. My problem is that when I traced it, the black space became the object and the letters are negative space. Is there a way to turn the letters into objects?

  • Whether I can create the substitution according to some business rule in WF

    Hi ,guys,     now I have a problem in creating the workflow business workplace substitution ,my scenario is that we want to create a substitution , the condition of creating shall follow certain rule(for example:production group ,or industry and so o

  • Configuring Static Route Tracking Using ASDM 7.1(3) ASA 9.1(2)

    I have recently updated my ASA5520 to 9.1(2) and I am using ASDM 7.1(3) to configure Static Route Tracking. I have done this previoussy in earlier version of ASDM without a problem.  There seems to be a new field in the Tracked Options section.  What

  • Adobe CC for MAC Launchpad icons

    Hello! After installing Adobe Creative Cloud desktop for MAC, on Launchpad appeared the following apps: AAMLauncherUtil and a group "Adobe Creative Cloud (Other)" which contains : ACCFinder.._Loader32 and ACCFinder.._Loader64. Pressing the apps on "A

  • Top menu items can't be removed

    I'm trying to remove the remove the Backblaze icon from my top menu bar. I've thrown away and cancelled Backblaze. Clicking on command and then trying to pull out the icon doesn't work. Clicking only launches a backblaze menu. Moving apple apps from