Patches & Updates
Deploy and monitor updates to all of your systems through Sun from anywhere you have an Internet connection.
Start today with Knowledge-based software update services for Solaris and Linux.
Patches:
Download Patch (19569199 bytes): HTTP 
Download Signed Patch (19563248 bytes): HTTP 
Signed Patch Documentation  Patch Finder

Obsoleted by: 113817-19 C++ 5.5: Patch for S1S8CC C++ compiler


Disclaimer: 

Please note: Although OBSOLETED patches are available on SunSolve, Sun recommends using the most recent patches and the most recent revision of those patches. OBSOLETED patches do not include the latest bug fixes and/or product enhancements, and may require the installation of additional patches as a corrective measure.

Status: OBSOLETE
Patch Id: 113817-18
***********************************************************************
READ THE TERMS OF THE AGREEMENT ("AGREEMENT") IN THE LEGAL_LICENSE.TXT
FILE CAREFULLY BEFORE USING THIS SOFTWARE. BY USING THE SOFTWARE, YOU
AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE
TERMS, PROMPTLY DESTROY THE UNUSED SOFTWARE.
***********************************************************************
Summary: Obsoleted by: 113817-19 C++ 5.5: Patch for S1S8CC C++ compiler
Date:  Aug/11/2006
Installation Requirements:
NA
Solaris Release: 7 8 9
Sun OS Release: 5.7 5.8 5.9
Unbundled Product: Sun ONE Studio 8 Compiler Common C++
Unbundled Release: 5.5
Xref: 
Topic: 
Relevant Architecture: sparc
BugId's fixed with this patch:

2121200 2121295 2121577 2122244 2122445 4306137 4418403 4425760 4490609 4546337 4626777 4633191 4654146 4680534 4685154 4707650 4771162 4793373 4805442 4811728 4813819 4821792 4825898 4825964 4828018 4828443 4829121 4829197 4829209 4829743 4830398 4831381 4832308 4832354 4832804 4835891 4835927 4836806 4839858 4840194 4842849 4843278 4843654 4844512 4845336 4845522 4845816 4845881 4845925 4846299 4846427 4846480 4846530 4847745 4848247 4848795 4848935 4850637 4851759 4852754 4853566 4853946 4854179 4854627 4854778 4856138 4856723 4857064 4857968 4858441 4859090 4859404 4860689 4864149 4864189 4867794 4867846 4869524 4873908 4875349 4875437 4876793 4878628 4883963 4884516 4884661 4886193 4886310 4888883 4891985 4892932 4894898 4895571 4901279 4902739 4911276 4913549 4916333 4918858 4919175 4919536 4924796 4926147 4927418 4927422 4930287 4930712 4942568 4945288 4945629 4949404 4951542 4951760 4951789 4953520 4953582 4953639 4955571 4956174 4956234 4957102 4961377 4965215 4967319 4967333 4969797 4973702 4974366 4984339 4988508 4991454 4997504 4997672 4999685 5001937 5003074 5006907 5018343 5019613 5024692 5037838 5041951 5052200 5053579 5053671 5054750 5056237 5057297 5065625 5066565 5075002 5077504 5092904 5092908 5094418 5097493 5102719 6191932 6193044 6193249 6197269 6221536 6223495 6244223 6250573 6252859 6283965 6286320 6304703 6323485 6329641 6332323 6334953 6337151 6354037 6354370 6354922 6378348 6431178 6433087 6438053

Changes incorporated in this version:

6438053 6433087 6431178

Patches accumulated and obsoleted by this patch:

Patches which conflict with this patch: 

Required Patches:

112763-15 (or greater)

Obsoleted by:
 
Files Included in this Patch: 
<install_dir>/SUNWspro/lib/libiostream.so
<install_dir>/SUNWspro/lib/v9/libiostream.so
<install_dir>/SUNWspro/prod/bin/CC
<install_dir>/SUNWspro/prod/bin/ccfe
<install_dir>/SUNWspro/prod/include/CC/Cstd/algorithm
<install_dir>/SUNWspro/prod/include/CC/Cstd/algorithm.cc
<install_dir>/SUNWspro/prod/include/CC/Cstd/fstream
<install_dir>/SUNWspro/prod/include/CC/Cstd/fstream.cc
<install_dir>/SUNWspro/prod/include/CC/Cstd/iostream
<install_dir>/SUNWspro/prod/include/CC/Cstd/iostream.h
<install_dir>/SUNWspro/prod/include/CC/Cstd/istream
<install_dir>/SUNWspro/prod/include/CC/Cstd/istream.cc
<install_dir>/SUNWspro/prod/include/CC/Cstd/limits
<install_dir>/SUNWspro/prod/include/CC/Cstd/ostream
<install_dir>/SUNWspro/prod/include/CC/Cstd/ostream.cc
<install_dir>/SUNWspro/prod/include/CC/Cstd/rw/iotraits
<install_dir>/SUNWspro/prod/include/CC/Cstd/rw/tree
<install_dir>/SUNWspro/prod/include/CC/Cstd/rw/tree.cc
<install_dir>/SUNWspro/prod/include/CC/Cstd/sstream
<install_dir>/SUNWspro/prod/include/CC/Cstd/sstream.cc
<install_dir>/SUNWspro/prod/include/CC/Cstd/stdcomp.h
<install_dir>/SUNWspro/prod/include/CC/Cstd/streambuf
<install_dir>/SUNWspro/prod/include/CC/Cstd/streambuf.cc
<install_dir>/SUNWspro/prod/include/CC/Cstd/string
<install_dir>/SUNWspro/prod/include/CC/Cstd/strstream
<install_dir>/SUNWspro/prod/include/CC/Cstd/vector.cc
<install_dir>/SUNWspro/prod/include/CC/rw7/rw/compiler.h
<install_dir>/SUNWspro/prod/include/CC/rw7/rw/xdrstrea.h
<install_dir>/SUNWspro/prod/include/CC/rw7/std/rw/compiler.h
<install_dir>/SUNWspro/prod/include/CC/stlport4/iostream
<install_dir>/SUNWspro/prod/include/CC/stlport4/iostream.h
<install_dir>/SUNWspro/prod/include/CC/stlport4/ostream
<install_dir>/SUNWspro/prod/include/CC/stlport4/ostream.h
<install_dir>/SUNWspro/prod/include/CC/stlport4/stl/_num_put.c
<install_dir>/SUNWspro/prod/include/CC/stlport4/stl/_threads.h
<install_dir>/SUNWspro/prod/include/CC/stlport4/using/h/iostream.h
<install_dir>/SUNWspro/prod/include/CC/stlport4/using/h/ostream.h
<install_dir>/SUNWspro/prod/include/CC/stlport4/using/iostream
<install_dir>/SUNWspro/prod/include/CC/stlport4/using/ostream
<install_dir>/SUNWspro/prod/include/CC/stlport4/wrap_std/h/iostream.h
<install_dir>/SUNWspro/prod/include/CC/stlport4/wrap_std/iostream
<install_dir>/SUNWspro/prod/include/CC/stlport4/wrap_std/ostream
<install_dir>/SUNWspro/prod/include/CC4/iostream.h
<install_dir>/SUNWspro/prod/lib/CC4/libCsunimath.a
<install_dir>/SUNWspro/prod/lib/libCrun.a
<install_dir>/SUNWspro/prod/lib/libCstd.a
<install_dir>/SUNWspro/prod/lib/libCsunimath.a
<install_dir>/SUNWspro/prod/lib/libCsunimathios.a
<install_dir>/SUNWspro/prod/lib/libiostream.a
<install_dir>/SUNWspro/prod/lib/libp/libCrun.a
<install_dir>/SUNWspro/prod/lib/libp/libCstd.a
<install_dir>/SUNWspro/prod/lib/libp/libiostream.a
<install_dir>/SUNWspro/prod/lib/locale/C/LC_MESSAGES/SUNW_SPRO_SC_ccfe.error_help.html
<install_dir>/SUNWspro/prod/lib/locale/C/LC_MESSAGES/SUNW_SPRO_SC_ccfe.msg
<install_dir>/SUNWspro/prod/lib/rw7/CC4/libp/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/CC4/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/CC4/librwtool.so.2
<install_dir>/SUNWspro/prod/lib/rw7/CC4/librwtool_dbg.a
<install_dir>/SUNWspro/prod/lib/rw7/libp/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/librwtool.so.2
<install_dir>/SUNWspro/prod/lib/rw7/librwtool_dbg.a
<install_dir>/SUNWspro/prod/lib/rw7/std/libp/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/std/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/std/librwtool.so.2
<install_dir>/SUNWspro/prod/lib/rw7/std/librwtool_dbg.a
<install_dir>/SUNWspro/prod/lib/rw7/std/v9/libp/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/std/v9/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/std/v9/librwtool.so.2
<install_dir>/SUNWspro/prod/lib/rw7/std/v9/librwtool_dbg.a
<install_dir>/SUNWspro/prod/lib/rw7/v9/libp/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/v9/librwtool.a
<install_dir>/SUNWspro/prod/lib/rw7/v9/librwtool.so.2
<install_dir>/SUNWspro/prod/lib/rw7/v9/librwtool_dbg.a
<install_dir>/SUNWspro/prod/lib/stlport4/libp/libstlport.a
<install_dir>/SUNWspro/prod/lib/stlport4/libstlport.a
<install_dir>/SUNWspro/prod/lib/stlport4/libstlport.so.1
<install_dir>/SUNWspro/prod/lib/stlport4/libstlport_dbg.a
<install_dir>/SUNWspro/prod/lib/stlport4/v9/libp/libstlport.a
<install_dir>/SUNWspro/prod/lib/stlport4/v9/libstlport.a
<install_dir>/SUNWspro/prod/lib/stlport4/v9/libstlport.so.1
<install_dir>/SUNWspro/prod/lib/stlport4/v9/libstlport_dbg.a
<install_dir>/SUNWspro/prod/lib/v8plus/libCstd.a
<install_dir>/SUNWspro/prod/lib/v8plus/libp/libCstd.a
<install_dir>/SUNWspro/prod/lib/v9/libCrun.a
<install_dir>/SUNWspro/prod/lib/v9/libCstd.a
<install_dir>/SUNWspro/prod/lib/v9/libCsunimath.a
<install_dir>/SUNWspro/prod/lib/v9/libCsunimathios.a
<install_dir>/SUNWspro/prod/lib/v9/libiostream.a
<install_dir>/SUNWspro/prod/lib/v9/libp/libCrun.a
<install_dir>/SUNWspro/prod/lib/v9/libp/libCstd.a
<install_dir>/SUNWspro/prod/lib/v9/libp/libiostream.a
Problem Description: 
6438053 sizeof() bug with function template parameter in studio 8
6433087 template parameter sizeof() problem in Studio 8
6431178 compiler assertion on code with template class having two base classes
 
(from 113817-17)
5056237 Missing overload for std::fpos<__mbstate_t>::operator+=(unsigned int)
6378348 setting bitfield in a destructor yields wrong value reading from temp object
 
(from 113817-16)
4845336 gcc compat: Special access to nested classes by class members
6191932 New compiler option: -features=[no%]nestedaccess
6221536 typedef as member of class template in nested template instantiation
6334953 Sun Studio 8 issue with precompiled headers.
6337151 stlport prints garbage value for LLONG_MIN
6354037 template declaration and definition treated as different templates
6354370 compiler incorrectly flagging as error  static_cast to convert
6354922 ofstream::close() method does not fail if it fails to flush the buffer to disk
 
(from 113817-15)
6304703 sort() hang in libCstd
6223495 building shared objects in archives yield inconsistent behaviour w/ -KPIC on Solaris 9
6250573 CC 5.5, 5.6, 5.7 incorrectly creates multiple instances of static template variables
6323485 Incorrect data generated with try-catch statements
6329641 __rb_tree::operator=() does not store rhs comparison object in lhs
6332323 istrstream operator>>() modifies target even if input is invalid
 
(from 113817-14)
4924796 BOOST 'constructors' test - Assertion: (../lnk/tmplmatchargs.cc, line 151)
6252859 anonymous structs with bitfields update wrong word
6283965 Compiler could not find a match for constructor
6286320 C++ Overloading Ambiguity
 
(from 113817-13)
6244223 Unreasonably amount of time spent in _memcpy
 
(from 113817-12)
2121200 C++ compiler should emit dependency info for make .KEEP_STATE purposes for templates, but doesn't
2121295 Rethrowing an exception in a catch block causing SIGABRT 
2121577 DROPS: mismatched names on template function parameters don't compile 
2122244 overloading of template conversion function 
2122445 "explicit" ignored when converting constructor needed 
4845522 C++ compiler assert: should report missing constructor
 
(from 113817-11)
4913549 -xpch=collect issues a warning but -xpch=use does not
5037838 int a, foo(int); doesn't compile
5077504 compiler doesn't check new(std::nothrow) for zero return
5092904 Warning: Illegal construct in pch viable prefix
5092908 ** Assertion ** : 0 (../lnk/c_dataparse.cc: 970)
5102719 Invalid use of "template" qualifier accepted
6193044 Unexpected type name encountered
6193249 signed int template parameter becomes unsigned int for bitfields.
6197269 DROPS: mismatched names on template function parameters don't compile
 
(from 113817-10)
5094418 duplicate destructor call, seems to be related to inline functions
5075002 template metaprogramming compiler bug
5041951 std::string destructor abort on freeing memory in multithreaded environment
5097493 -Xt K&R transition flag doesn't work correctly in S1S8
 
(from 113817-09)
5053671 warning about no return value sometimes disappears
5066565 113817-05: C++ 5.5 ccfe hangs and consumes one cpu, when using -O3, or above
4997672 ccfe loops at -xO3
4811728 Debugging a 64-bit executable using RTC shows RUI error
5065625 assertion failure in ir_util.cc
5053579 -mt or -xautopar -xO3 causes runtime hanging in mercury & venus
4957102 C++ compile with -mt -xarch=v8plus -library=stlport4 generates core
4857968 uncaught_exception() broken
4997504 Problems with istream::readsome() in libCstd
5001937 dlopen/dlclose a C++ shared lib causes MT C program to SEGV
5054750 Undefined inline template instance
5003074 parens around function declarator not recognized
5052200 fail to compile plumhall testcase
4919175 syntax errors on a qualified dtor call
4425760 compiler does not recognize pointer-to-function as template parameter
5057297 build libstlport.a with PIC
 
 
(from 113817-08)
5024692 Regression observed in compilation time with C++ 5.5 as compared to F7 & F6U2.
5019613 ostrstream writes NULL terminator into char array
5018343 pointer-to-function template parameter type not handled
 
(from 113817-07)
4878628 missing run-time type information - Undefined  __RTTI symbol
4892932 C++ preprocessor doesn't properly include files w/ same name diff direcortors
4955571 c++ compiler generates erroneous errors
4988508 app crashes at runtime w/ -features=tmplife and inlining, when unwinding stack
4991454 friend declaration not matched to template function in namespace
4999685 Problem with nested template class specialization
5006907 SUNWspro/inventory/v11n1/SPROstl4h does not exist
 
(from 113817-06)
4945288 Sdtimage crash when opening *.tif and *.gif file.
4967333 internal use of clog/__clog in -lC/-liostream should bind to its own copy
4973702 C++ 5.5: cg error (as) : location counter not on doubleword boundary
4984339 libiostream is always linked statically
 
(from 113817-05)
4918858 incorrect use of "typename" in standard headers
4919536 libCstd does not provide enough overloads of operator>() for fpos
4927422 Compilation error about local variable not being defined
4967319 RWBTreeOnDisk insertKeyAndValue function fails with SIGSEGV in strncmp
4969797 ccfe "Assertion:  (../lnk/prepexpression.cc, line 69" upon missing definition
4974366 regression of 113817-04, Error: Different types for "?:" (? and void)
 
(from 113817-04)
4828018 unexpected "could not find match" error
4843654 Template type induction failure
4927418 A "control G" character appears after preprocessing some macro.
4930287 Unable to build isvapp mico
4942568 destructor of compiler generated temp variable called twice
4945629 Symbol referencing error if no optimization, rtti and "-xldscope=symbolic"
4949404 numeric_limits doesn't understand 64 bit integers
4951542 volatile attribute lost during cast
4951760 C++ compiler cannot match overload operator template definition
4951789 incorrect value for numeric_limits::is_modulo
4953520 C++ 5.5 ccfe dumps core due to stack overflow
4953582 stringstream::seekg() does not set the current pointer at the designated positio
4953639 istream::getline reads upto n-2 characters where n is buffer size
4956174 RWBTreeOnDisk find functions fail with SIGSEGV in strncmp
4956234 missing extern C++ overloads for qsort (and bsearch ?)
4961377 illegal operation on operator== with enumeration template instance
4965215 cerr hanging if interupted by a signal
 
(from 113817-03)
4916333 C++ 5.4/5.5: Segmentation Fault in ccfe
4926147 RW Tools.h++ headers broken for Solaris 9
4911276 Incorrect offsetof() in presence of overloaded "&" operator
4930712 Assignment inside the return() seems to return incorrect value
 
(from 113817-02)
4546337 called function cannot be defined inline
4829121 BOOST: Assertion:   (../lnk/init.cc, line 999)
4842849 C++ 5.4 with patch 111715-05 and 111715-06 consumes too much memory.
4857064 Assertion:   (../lnk/v2mangler.cc, line 1172)
4859090 error on function template return type
4859404 C++ 5.3 compiler corrupts object pointer in inline destructor when goto is used.
4860689 QS: fatal runtime error with -xprofile=collect -mt after dlclose()
4864149 QS: C++ compiler fails with specializing error
4867794 QS: Numerical escapes support needed in UCS-2 characters
4867846 QS: Single macro for these USC-2 character and string literal features
4869524 C++ 5.3 and -xO2 : compiler(iropt) error:  connect_labelrefs: undefined label
4873908 explicit specialization not found for default template parameter
4875349 Assertion:  (../lnk/init.cc, line 957) or 999
4875437 C++ 5.6 regression, cannot build fortran compiler
4876793 second argument to deallocate() should be the strings capacity NOT length
4883963 cafe fails to detect ambiguous overloaded functions call
4884516 libCstd vector class does not pass correct size to deallocator
4884661 S1 Studio 8 C++ chooses wrong conversion operators
4886193 CC -xOn -g0 (n>0) does not emit N_SLINE stabs
4886310 Overloading ambiguity error with usage of template function with const vector
4888883 incorrect ambiguity error on conversion to bool
4891985 problem with Partial specialization
4894898 the fixes for bugs 4856138 and 4876793 break binary compatibility
4895571 Invalid version string for ccfe
4901279 Assertion in entrycreator.cc with virtual function in template class
4902739 assertion ../links/prepexpression.cc, line 65 due to missing constructor
 
(from 113817-01)
4840194 CC driver refuses to invoke the linker without .o or .a on link line
4844512 QS: C++ dirver doesn't pass prof_lib.o to linker. Results in unresolved symbols.
4845925 C++ driver does not pass -D_REENTRANT when passed -xopenmp
4850637 String "Forte Developer" is remaining.
4851759 -xlang=f77 problem in K2
4828443 incorrect number of characters outputed after fix of bug 4747931
4825898 C++ runtime performace standard iostream is much slower than classic iostream
4853946 static template class variable must be __global when use -xldscope=symbolic
4856138 libCstd string class does not pass correct size to deallocator
4306137 ccfe allows access to copy constructor of private base class
4680534 cafe fails to detect prohibited implicit pointer conversion
4654146 compiler fails to diagnose a const-correctness violation
4831381 assertion ../lnk/tmplmatchargs.cc in CC 5.4
4835927 OpenMP-CC: enindex_node bad tag error for correct code
4835891 static member functions in derived class collide due to using-declarations
4805442 cpp-perf: compiler should keep track address not taken static variables
4830398 test compiled with -g SF in some cases
4793373 Bug with using-declarations and virtual functions
4836806 CC OpenMP: OpenMP for loop decision variable temporaries at offset zero
4832354 problem with changing the name of template parameter
4832804 Inherited class does not seem to get the default destructor
nobugid_1 C++ OpenMP: In some cases the use of std::coutin a parallel region causes compile error.
4829209 PCH: #error directive is not allowed in viable prefix
4821792 PCH: incorrect viable prefix when declaration used in main source
4829197 PCH: problem in pragma support
4829743 OMP-CC: threadprivate within class message is somewhat inaccurate
4707650 CC -E should emit #1 directive when reading a new file
4846427 C++ OpenMP: Calling inline functions generates spurious leaves.
4813819 OMP-CC: unreference leafs in arg seg
4839858 valid conversion to base class rejected
4846480 Signal 11 with -xdumpmacros
4848247 incorrect result from extracting float type with stdargs
4848795 Assertion error in mangler in 5.3 and 5.4 C++ compiler
4832308 Need to turn off data fragementation for TLS
4633191 bogus warning with exception specification
4847745 implicitly declared operator= is not created
4845881 QS: Macro expansion interferes with STLport  headers.
4843278 PCH: C++ detects error on the valid code
4825964 PCH: a variable defined in .h file is not found by C++
4848935 PCH: string following #pragma ident should be ignored in the viable prefix
4685154 Illegal use of '<>' in primary template declaration not reported by ccfe
4845816 QS: Need to allow symbol scoping to the template class definition.
4852754 +w yields warnings in the standard library
4854627 build failure due to new template warning
4846530 QS: Need capacity to force references to have global linker scoping
4853566 Strange conditional expression (?:) bug (core at runtime)
4626777 template partial specialization missed as friend
4858441 C++ 5.6 fails to build with math library 111721-04
4856723 OMP-CC: run time segment fault using cout and -xipo
4771162 OMP-CC: invalid atomic expression gives incorrect message
4854778 111685-14: regression: CC fails to compile operator declared forward in template
4854179 modena testcase c1120403 failed when compile with Nightly and K2 patch compiler
4418403 Using address of template function must instantiate
4490609 C++ 5.1, 5.2 & 5.3 initializing problem.
nobugid_2 Assertion from libC.so when exception is thrown by old compat=4 code.
4864189 numeric_limits denorm_min incorrectly returns zero
4846299 111685-13: destructor called when there was no constructor while unwinding stack
Revision History: 

113817-14 113817-03 113817-10 113817-09 113817-07 113817-02 113817-13 113817-17 113817-06 113817-08 113817-12 113817-16 113817-01 113817-05 113817-15 113817-04 113817-11

Patch Installation Instructions: 
--------------------------------
For Solaris 7-9 releases, refer to the man pages for instructions on
using 'patchadd' and 'patchrm' scripts provided with Solaris.
Any other special or non-generic installation instructions should be
described below as special instructions.  The following example
installs a patch to a standalone machine:
 
        example# patchadd /var/spool/patch/106326-01
 
The following example removes a patch from a standalone system:
 
        example# patchrm 104945-02
 
For additional examples please see the appropriate man pages.
Special Install Instructions: 
-----------------------------
 
If you are compiling or linking programs or shared libraries
using -xprofile=collect, it is strongly recommended that you also
install the most recent version of the following patches for the
corresponding compiler products shown below:
 
	product	    patch
	-------	    -----
	C   5.5	    112760-02 or later
	C++ 5.5	    113817-02 or later
	F95 7.1	    112762-02 or later
 
Patch 112763-03 or later provides a new object file "prof_tsd.o" which
exports global routines required at runtime for correct execution
of MT applications that dynamically link with shared libraries
that have been compiled and linked with -xprofile=collect.
In order to pass "prof_tsd.o" to the linker when a program
is linked with -xprofile=collect, changes to the cc, CC, and
f95 drivers are required.  These driver changes are provided
in the above patches to the C, C++, and F95 products.
 
To test whether you have installed the patches correctly, use the
following test case, which consists of a C++ source file "main.cc",
two C source files "test.c" and "shared.c", and a shell script "try.sh"
which compiles and links "main.cc" and test.c" into a profiled program
"main", and also compiles and links "shared.c" into a profiled shared
library "shared.so":
 
    % cat main.cc
 
    extern "C" test_();
 
    int
    main()
    {
	test_();
	return 0;
    }
 
    % cat test.c
 
    #include <thread.h>
    #include <dlfcn.h>
    #include <link.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <errno.h>
    static void
    dlerror_message(const char *fn)
    {
	const char *msg = dlerror();
	fprintf(stderr, "%s() failed", fn);
	if (msg != NULL)
	{
	    fprintf(stderr, ": %s", msg);
	}
	fprintf(stderr, "\n");
    }
    void *
    foo(void* cookie)
    {
	void *hndl = dlopen("./shared.so", RTLD_NOW);
	if (hndl == NULL)
	{
	    dlerror_message("dlopen");
	}
	else /* hndl != NULL */
	{
	    void *f = dlsym(hndl, "function_f");
	    if (f == NULL)
	    {
		dlerror_message("dlsym");
	    }
	    else
	    {
		((void(*)(void))f)();
	    }
	    dlclose(hndl);
	}
	return NULL;
    }
    int test_()
    {
	thread_t tid;
	thr_create(NULL, 0, foo, NULL, THR_BOUND|THR_NEW_LWP, &tid);
	thr_join(tid, NULL, NULL);
	printf("end of test\n");
	return 0;
    }
 
    % cat shared.c
 
    #include <stdio.h>
    void
    function_f(void)
    {
	printf("Here's function f\n");
    }
 
To compile and execute the installation test case, use
the following shell script:
 
    % cat try.sh
    #!/bin/sh
    set -x
    cc -O -mt -xprofile=collect -KPIC shared.c -G -o shared.so \
    && cc -O -mt -xprofile=collect test.c -c \
    && CC -O -mt -xprofile=collect main.cc test.o -o main \
    && rm -rf main.profile \
    && ./main \
    && ls main.profile
 
There are four (4) installation cases to consider.
 
Case 0 (no patches installed):
------------------------------
 
If neither patch 112763-03 or later (Common Compiler S1S8CC) nor
patch 113817-02 or later (C++ 5.5) has been installed correctly,
both the program "main" and the shared library "shared.so" will
compile and link without errors, but the process will abort at
runtime with a Segmentation Fault:
 
    % sh try.sh
    + cc -O -mt -xprofile=collect -KPIC shared.c -G -o shared.so
    + cc -O -mt -xprofile=collect test.c -c
    + CC -O -mt -xprofile=collect main.cc test.o -o main
    + rm -rf main.profile
    + ./main
    Segmentation Fault - core dumped
 
Case 1 (missing C++ 5.5 patch):
-----------------------------
 
If patch 112763-03 or later (Common Compiler S1S8CC) has been installed
correctly, but patch 113817-02 or later (C++ 5.5) has not, both
the program "main" and the shared library "shared.so" will
compile and link without errors, but the shared library
"shared.so" will print a warning message at runtime and will
run with MT profile collection disabled.
 
    % sh try.sh
    + cc -O -mt -xprofile=collect -KPIC shared.c -G -o shared.so
    + cc -O -mt -xprofile=collect test.c -c
    + CC -O -mt -xprofile=collect main.cc test.o -o main
    + rm -rf main.profile
    + ./main
    profile feedback: dlsym() could not find function __new_profile_thread_list_ops()
    warning: MT profile collection disabled for object file "/home/joe/bugs/4860689/tmp/shared.o"
    Here's function f
    end of test
    + ls main.profile
    feedbin         feedbin.lock
 
Note that in this case, despite the runtime warning message, the
feedback file main.profile/feedbin was generated.   In an actual MT
application, some of the profile data in the feedback file may be
inaccurate, due to concurrent attempts to update profile counters
by multiple threads.  If multiple threads simultaneously attempt to
close the same profiled shared library by calling dlclose(3DL), the
contents of the feedback file may be corrupted or lost.
 
Case 2 (missing Common Compiler S1S8CC patch):
----------------------------------------------
 
If patch 113817-02 or later (C++ 5.5) has been installed correctly
but patch 112763-03 or later (Common Compiler S1S8CC) has not, the program
"main" will fail to link correctly.  A message from the driver (CC)
will indicate that the required object file "prof_tsd.o" is missing:
 
    % sh try.sh
    + cc -O -mt -xprofile=collect -KPIC shared.c -G -o shared.so
    + cc -O -mt -xprofile=collect test.c -c
    + CC -O -mt -xprofile=collect main.cc test.o -o main
    CC: Cannot find /opt/SUNWspro/prod/lib/prof_tsd.o
 
Case 3 (both C++ 5.5 and Common Compiler S1S8CC patch installed correctly):
---------------------------------------------------------------------------
 
If patch 112763-03 or later (Common Compiler S1S8CC) and patch 113817-02
or later (C++ 5.5) have both been installed correctly, both the
program "main" and the shared library "shared.so" will compile,
link, and execute correctly, producing a profile feedback file
"main.profile/feedbin":
 
    % sh try.sh
    + cc -O -mt -xprofile=collect -KPIC shared.c -G -o shared.so
    + cc -O -mt -xprofile=collect test.c -c
    + CC -O -mt -xprofile=collect main.cc test.o -o main
    + rm -rf main.profile
    + ./main
    Here's function f
    end of test
    + ls main.profile
    feedbin         feedbin.lock

README -- Last modified date:  Monday, November 20, 2006

 
 
Login Required

You must login and have a valid contract to access Sun's Premium content which includes:

  • Sun Alerts
  • Bugs
  • Patches
  • Solutions
  • White Papers
  • Documentation
  • Support Knowledge

Login Required

You must login and have a valid contract to access Sun's contracted features

Access Legend:

(Login to access)   Sun Contracted Content
(Login to access)   Sun Contracted Feature

Please make use of SunSolve Feedback application by selecting the floating [+] to provide feedback about this specific document.

Search

Article Details
Article ID : 113817-18
Article Type : Patch Descriptions
Last reviewed : 2006-08-11
Audience : PUBLIC
Keywords : c++ 5.5 cc 5.5 s1s8cc
Provide feedback  (help)
Page Tools
»  Print This Page
»  Email This Article
»  Bookmark This Article
 
Contact About Sun News & Events Employment Site Map Privacy Terms of Use Trademarks Copyright Sun Microsystems, Inc. | SunSolve Version 7.4.0 #1