Patch Name: PHSS_16586 Patch Description: s700_800 10.[12]0 HP aC++ compiler (A.01.18) patch Creation Date: 98/11/11 Post Date: 98/11/23 Hardware Platforms - OS Releases: s700: 10.10 10.20 s800: 10.10 10.20 Products: HP aC++ B3910B A.01.15 Filesets: ACXX.ACXX ACXX-ECOM.ACXX-ECOM ACXX.ACXX-MAN ACXX-ECOM.ACXX-MAN ACXX.ACXX-STDLIB ACXX-ECOM.ACXX-STDLIB Auxiliary-Opt.LANG-AUX Automatic Reboot?: No Status: General Release Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHSS_16586 Symptoms: PHSS_16586: 1. Wants to use C++ shared libs from C main. 2. Suggestion 431 unknown position on "that" 3. Bad error 558 taking address of protected member in default arg 4. Error 226 on overloaded function 5. Error 5172 initializing array of pointer to virtual base class 6. Signal 11 with RWCString and RWCRExpr, chars >= 128 7. Signal 11 stackoverflow 8. Error 176 using static const int from const template arg 9. Assert with member templates and +inst_all in Templates.C 10. Bad cast on a const A* const& to A* 11. Assert on complex virtual inheritance in Vtables.C 12. A.01.15 does not detect Overload ambiguities 13. Support #pragma PACK/ #pragma HP_ALIGN to match C 14. FE OPT: function call disappears on return 15. Bad debug info for static const array member if no init in file 16. Wrong source file when debugging function with default parms 17. Infinite loop compiling multiple PODs initialized with ctor syntax 18. -O takes 12 times as long, too much inlining, into destructors 19. Error 440 if template and assign pointer to memfunc to ptr func 20. Checking for error 814 loop or stack overflow on catch nested class 21. Access of class operator delete not checked on new expr 22. Bad debug info, can't access local variables 23. Use of template static function in init, doesn't instantiate it 24. Destructor not called for object if using declaration in function 25. Error 658 and 181 using and pointer_to_*_function 26. Signal 11 on default values 27. Error 172 class member fctn doesn't find template parm 28. offsetof() macro gives incorrect result for multiple inheritance PHSS_16545: 1. Signal 11 deleting string::nullref twice, threads Defect Description: PHSS_16586: 1. The current documentation says that the C main must call _main() and the a.out must be linked with the aCC driver. This is true when linking against aC++ archive libraries. Also the aC++ runtime libraries and /usr/lib/aCC/dld.sl patches must be installed if on HP-UX 10.10 or 10.20. If linking against aC++ shared libraries, or dynamically loading from them, some of these restrictions can be relaxed as long as the following is observed: A) At least the A.01.07 aC++ runtime patch is needed along the /usr/lib/aCC/dld.sl patch. B) _main() must still be called, before any use of aC++ code. I.e. it could be placed in the C++ library itself. C) The a.out must be linked with libcl.sl, -lcl. D) Except when dynamically loading the C++ shared library, the a.out must be linked with the aC++ runtime libraries in this order: -lstd -lstream -lCsup -lm -lcl -ldld If the library is not using libstd (STL) or libstream (iostreams), then they can be eliminated. If tools.h++ is used, then add -lrwtool to the left. E) The following stub file needs to be linked into the shared library or every a.out. Assemble as follows: as cpprt0_stub.s or: cc -c cpprt0_stub.s ================ cpprt0_stub.s =================== .code ; stubs for static constructors in a.out .export __StaticCtorTable_Start,data .export __StaticCtorTable_End,data __StaticCtorTable_Start __StaticCtorTable_End .data ; stubs for static a.out constructors, compiled with +z/+Z .export __ZStaticCtorTable_Start,data .export __ZStaticCtorTable_End,data __ZStaticCtorTable_Start __ZStaticCtorTable_End 2. Compiler generated a parameter for allocator::allocator(const allocator& that) but the class is empty so the parameter is never accessed. 3. Default argument context is not being considered. 4. Overload resolution was not doing function/array decay to ptr when looking for user defined matches. 5. Improper code generation for element at offset 0 in array 6. RWCRExpr may have memory fault when a RWCString initialized by some negative char value. 7. User conversion from void* was allowed for function type 8. Template dependency not checked correctly 9. Template explicit instantiation assumed all member function were members of template classes 10. In the following code fragment the cast causes the address of the pointer to be copied to "b" and not the value. void print3(const A* const &a){ A *b = (A*)a; 11. Secondary vtable generation can find conflicting overrides from disjoint inheritance trees. Wait till after complete traversal to see if error remains 12. The error: Error 225: # Ambiguous overloaded function call; more than one acceptable function found... was not being issued properly. 13. aC++ did not until recently support #pragma directives to control the packing of structures. The industry-standard #pragma pack was added. 14. A function returning a static member function directly will not generate code for that function call: int stuff::bar(int x) { ... return foo(x); } 15. Debuggers will display the wrong information for a static const array class member if no initialization in the file. 16. Debugger (DDE) pointed to the wrong file/line when a break was chosen on a line after a call to an inline template function that had default arguments. 17. The following causes the compiler to get in an infinite loop: extern int abc, bcd; int abc(1), bcd(1); If the basetype is replaced by a class the following error occurs: Error (internal problem) 200: "test.c", line 5 # Assertion failed at [File "Statement.C"; Line 227] 18. The compiler is inlining functions too eagerly, thereby growing very large units that the optimizer cannot process in a timely manner. 19. The compiler does not detect illegal initialization of a pointer to a function by a pointer to a member function if in a template and the previous field is initialized by a non-type template parm: template _ATL_CACHEDATA _CComCacheData::data = {L, T::CreateInstance}; Error 440: Cannot initialize 'void (*)(void *)' with ''. If a cast is used, then the compiler gets an assert in Expand.C. 20. Search for improper class definition hit infinite loop when inner class referenced outer class. 21. aCC fails to check access to the deallocation function when processing a 'new' expression that creates an object or array of objects of class type. 22. aCC compiler can not generate correct debug information for some local variables. 23. Data generation did not signal taking the address of a function. 24. There is no call to a destructor for a local object if a using declaration is also used. 25. Using pointer_to_unary_function or pointer_to_binary_function with a function that take reference parameters will get error 658. Error 181 will also occur because the compiler assumes that those classes need a default constructor when used as a default value in a template parameter. 26. Semantics of default arguments uses temporaries. These temporaries are incorrectly reused. 27. Enclosing scope with template parameter names was not set 28. Currently casting a null pointer to base/derived is never adjusted. This breaks offsetof() PHSS_16545: 1. Signal 11 in threads routine, cma_mutex_delete may occur when using cma threads and string. When using Purify, it may indicate trying to free a freed region. SR: 1653214734 1653218180 1653241257 1653258756 1653263558 1653263699 1653264077 1653264259 1653265645 1653268292 1653268433 1653269217 1653278440 4701342493 4701372342 4701397992 4701403576 5003391045 5003415935 5003416883 5003418046 5003419838 5003420190 5003420984 5003422311 5003422584 5003423319 5003428425 5003431072 5003432575 5003436600 5003438531 Patch Files: /opt/aCC/bin/aCC /opt/aCC/bin/c++filt /opt/aCC/lbin/assigner /opt/aCC/lbin/ctcom /opt/aCC/lib/nls/msg/C/aCC.cat /opt/aCC/lib/nls/msg/C/aCC.msgs /opt/aCC/include/functional /opt/aCC/include/list /opt/aCC/include/list.cc /opt/aCC/include/string /opt/aCC/include/string.cc /opt/aCC/share/man/man1.Z/aCC.1 /opt/aCC/newconfig/RelNotes/ACXX.release.notes /opt/langtools/lib/nls/msg/C/ucomp.cat.tmp /opt/langtools/lbin/ucomp.tmp /opt/aCC/lbin/ld what(1) Output: /opt/aCC/bin/aCC: HP aC++ B3910B A.01.18 HP aC++ B3910B A.01.12 Language Support Library /opt/aCC/bin/c++filt: HP aC++ B3910B A.01.18 HP aC++ B3910B A.01.12 Language Support Library /opt/aCC/lbin/assigner: HP aC++ B3910B A.01.18 HP aC++ B3910B A.01.12 Language Support Library /opt/aCC/lbin/ctcom: HP aC++ B3910B A.01.18 HP-UX SLLIC/OPTIMIZER UX.10.20.562 (DAVIS): 10/07/98 HP aC++ B3910B A.01.12 Classic Iostream Library HP aC++ B3910B A.01.12 Language Support Library Ucode Code Generator - UX10.20.66 (PACG_UX10) REV: HP SESD Support Code High Level Optimizer - UX.10.21.980511 (UX10.MULTI) [-DHLO_RELEASE +O2] - 14-Sep-98.20:03 linkstamp 11/11/98 11:57:16 /opt/aCC/lib/nls/msg/C/aCC.cat: None /opt/aCC/lib/nls/msg/C/aCC.msgs: None /opt/aCC/include/string.cc: None /opt/aCC/include/functional: None /opt/aCC/include/list: None /opt/aCC/include/list.cc: None /opt/aCC/include/string: None /opt/aCC/share/man/man1.Z/aCC.1: None /opt/aCC/newconfig/RelNotes/ACXX.release.notes: None /opt/langtools/lbin/ucomp.tmp: HP-UX UCOMP UX.10.20.318 (DAVIS): 10/07/98 HP-UX SLLIC/OPTIMIZER UX.10.20.562 (DAVIS): 10/07/98 Ucode Code Generator - UX10.20.66 (PACG_UX10) High Level Optimizer - UX.10.21.980511 (UX10.MULTI) [-DHLO_RELEASE +O3] - 20-Oct-98.14:41 /usr/lib/libc: $Revision: 76.3 $ /opt/langtools/lib/nls/msg/C/ucomp.cat.tmp: None /opt/aCC/lbin/ld: 92453-07 linker linker ld B.10.30 980630 cksum(1) Output: 4150878929 192512 /opt/aCC/bin/aCC 301772998 68780 /opt/aCC/bin/c++filt 4046667963 490176 /opt/aCC/lbin/assigner 3944151734 10502168 /opt/aCC/lbin/ctcom 222232176 113923 /opt/aCC/lib/nls/msg/C/aCC.cat 1945322446 227108 /opt/aCC/lib/nls/msg/C/aCC.msgs 1097208397 25520 /opt/aCC/include/string.cc 32240074 16195 /opt/aCC/include/functional 1909115111 24854 /opt/aCC/include/list 1790036327 10795 /opt/aCC/include/list.cc 2978752336 63410 /opt/aCC/include/string 118373133 17961 /opt/aCC/share/man/man1.Z/aCC.1 2332231334 43574 /opt/aCC/newconfig/RelNotes/ ACXX.release.notes 298349161 5521408 /opt/langtools/lbin/ucomp.tmp 2780041833 38214 /opt/langtools/lib/nls/msg/C/ucomp.cat.tmp 4226430433 442368 /opt/aCC/lbin/ld Patch Conflicts: None Patch Dependencies: s700: 10.10: PHSS_16585 PHKL_8691 PHSS_15389 PHSS_15380 s700: 10.20: PHSS_16585 PHKL_8693 PHSS_15389 PHSS_15380 PHCO_14645 s800: 10.10: PHSS_16585 PHKL_8692 PHSS_15389 PHSS_15380 s800: 10.20: PHSS_16585 PHKL_8694 PHSS_15389 PHSS_15380 PHCO_14645 Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_16545 Equivalent Patches: None Patch Package Size: 17070 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHSS_16586 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHSS_16586.depot 5b. For a homogeneous NFS Diskless cluster run swcluster on the server to install the patch on the server and the clients: swcluster -i -b This will invoke swcluster in the interactive mode and force all clients to be shut down. WARNING: All cluster clients must be shut down prior to the patch installation. Installing the patch while the clients are booted is unsupported and can lead to serious problems. The swcluster command will invoke an swinstall session in which you must specify: alternate root path - default is /export/shared_root/OS_700 source depot path - /tmp/PHSS_16586.depot To complete the installation, select the patch by choosing "Actions -> Match What Target Has" and then "Actions -> Install" from the Menubar. 5c. For a heterogeneous NFS Diskless cluster: - run swinstall on the server as in step 5a to install the patch on the cluster server. - run swcluster on the server as in step 5b to install the patch on the cluster clients. By default swinstall will archive the original software in /var/adm/sw/patch/PHSS_16586. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. Warning: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHSS_16586.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_16586.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: When using HP aC++ and Purify, PureCoverage, or Quantify on HP-UX 10.20, you should install the latest libcl patch if you find that exceptions do not work. The most recent 'libcl' is available in PHSS_16690. Any patch that superseeds PHSS_16690 will also work.