Sponsored Content
Operating Systems HP-UX Program crashes with optimization level O2 Post 302131912 by Yuriy07 on Tuesday 14th of August 2007 09:52:21 AM
Old 08-14-2007
Quote:
Originally Posted by porter
Often optimizations are incompatible with debuggers because optimizers will re-organize variables on the stack for efficiency, um, basically optimizing the thing.

Optimizers are more aggressive and less forgiving of dodgy code.

Also, if you are using C++ libraries, have these been built with the same optimizations?


Use maximum warning and errors during compilation, for HPUX compilers I use "-Aa -D_HPUX_SOURCE +e +We".

Try GCC and see if that exposes anything, again use "-Wall -Werror".
Thank you, porter!

I tried -Aa option. The code won't compile, it complains about the inline statements we have in our code. Apparently, there's a reason why the -AA flag is used. All libraries are built with the same options.

It's weird to see that -g option is not compatible with -O (a typical optimization option).

The aCC man page says that +O2 optimization option is the same as +O1 optimization plus global optimization. What the "global optimization" means in this case? Are there any specific things I have to check in my code for that cause the crash with +O2 option, but not +O1?


Thank you in advance.
 

9 More Discussions You Might Find Interesting

1. Programming

AIX 5.3 64-bit program crashes with AIX 5.1

I have an AIX 64-bit program which uses following from AIX5.3 /usr/lib/libc.a(shr_64.o) /usr/lib/libpthread.a(shr_xpg5_64.o) /home/jeet_xp/export/power/usr/lib/libsarpc.a(shr.o) /unix /usr/lib/libcrypt.a(shr_64.o) /usr/lib/libc_r.a(shr_64.o) ... (3 Replies)
Discussion started by: jeet_xp
3 Replies

2. UNIX for Advanced & Expert Users

Which Base Level Filesets needed by a specific program?

hello... thats a great forum btw :) my problem is that I need a list of the Base Level Filesets (BLF) which are needed by a specific program. Is there any command/tool which shows me that? during the installation I can choose "Preview only" so that I can see what BLF´s are missing etc but... (4 Replies)
Discussion started by: cypher82
4 Replies

3. UNIX for Dummies Questions & Answers

Text book / online resource for learning to program at system/kernel level

Is there any book/resource that one can refer to, to be able to write programs at kernel/system level.. I'm looking for a programming book that could serve as a guide to write kernel codes / system level programming etc.. I have Tannenbaum's Design and Implementation. It addresses theoretical... (2 Replies)
Discussion started by: vishwamitra
2 Replies

4. Solaris

Difference between run level & init level

what are the major Difference Between run level & init level (2 Replies)
Discussion started by: rajaramrnb
2 Replies

5. Programming

C++ program crashes

Hi, Could anyone tell me the reason why the following program crashes? class A { int x; public: A() { cout << "from A()" << endl; } ~A() { cout << "from ~A()" << endl; } }; class B : public A { public: B() { cout << "from B()"... (2 Replies)
Discussion started by: royalibrahim
2 Replies

6. Programming

Program crashes on calling __libc_msgrcv()

Hi, I am a newbie to linux programming. I have implemented msgqueue in C. msgrcv() call at the client end is as below: msgrcv( msgqid, msgptr, msgsize, msgtype, 0 ); My program works fine when msgrcv () from /lib/libc.so.6 is called. However it crashes when __libc_msgrcv() is called. ... (3 Replies)
Discussion started by: praasanna
3 Replies

7. Programming

C++ program crashes

Hi, Can anyone tell me why the below program is crashing? and where exactly it is crashing. What is the corrective measure to be taken to make it work fine? #include <iostream> #include <cstring> using namespace std; class CString { char* m_data; public: CString() :... (6 Replies)
Discussion started by: royalibrahim
6 Replies

8. Red Hat

SSL certificate generation on OS level or application level

We have a RHEL 5.8 server at the production level and we have a Java application on this server. I know of the SSL certificate generation at the OS (RHEL) level but it is implemented on the Java application by our development team using the Java keytool. My doubt is that is the SSL generation can... (3 Replies)
Discussion started by: RHCE
3 Replies

9. UNIX and Linux Applications

Apcupsd crashes

I am trying to run apcupsd, but it will not retain contact the UPS root@meow:/home/ethan/UPS/gapcmon-0.8.9# /etc/init.d/apcupsd start Starting UPS power management: A copy of the daemon is still running. If you just stopped it, please wait about 5 seconds for it to shut down.... (0 Replies)
Discussion started by: Meow613
0 Replies
footprints(1)						      General Commands Manual						     footprints(1)

NAME
footprints - summarize information from compiler footprint records SYNOPSIS
filename... DESCRIPTION
The command scans the named object files, analyzes the compiler footprint records stored in those files, and generates a summary report. This report is intended for use by HP support and lab engineers to assist in problem diagnosis. The report contains the following information: o Total number of compilation units found. o Earliest and latest compiler timestamp, and the linker timestamp (if available). o Total size of text and data segments. o List of compiler versions used, with number of compilation units compiled with each version. o List of options used, with number of compilation units compiled with each option setting. This list is separated into two groups, with the most interesting options in the first group, followed by all remaining options alphabetized in the second group. The following file types are recognized: o Executable files and shared libraries. The command will attempt to find all dependent, non-system shared libraries and will print a separate report for each shared library. If the or environment variable is set, it will search for dependent libraries in the directories listed in the environ- ment variable (if is set, will be ignored). It will also use the embedded search path in the object file. If a shared library cannot be located, a diagnostic will be printed and execution will continue. o Archive libraries. The command will scan each object file member of the archive. o Relocatable object files. The command will scan the named object files. The command supports SOM and ELF object file formats, 32-bit and 64-bit code, and PA-RISC and Integrity systems. It supports compiler footprints produced by the HP C and C++ compilers. Compilation units produced by other compilers may not be reflected in the summary. Options The command recognizes the following options: Print the version number and quit. Verbose mode: prints detail information about each compilation unit found. Prints warnings for possible compatibility problems. Currently, it prints a warning for any compilation units built for Integrity systems with a C/C++ compiler earlier than Version A.05.50. Warnings are printed to stderr with three asterisks at the beginning of the line. EXAMPLES
The following example shows the beginning of a typical summary report: Scanning /usr/bin/ksh ... Compiler footprint summary Number of compilation units: 51 Earliest compiler timestamp: N/A Latest compiler timestamp: N/A Linker timestamp: 15-Jul-2006 13:07 UTC Total size: 425.8K (text) 24.8K (data) version [A.06.11/ANSI C 51] architecture [ipf32 51] -O [01 1] [02 50] PBO [off 51] -g [off 51] debugopt [off 51] +Ointeger_overflow [moderate 51] +Olit [const 51] +eh [off 51] -fpeval [float 51] -inline [1 1] [2 50] -link_type [dynamic 51] -mt [(off) 51] -rodata [cond 51] ... The line shows that all 51 compilation units were compiled with Version A.06.11 of the ANSI C compiler. The line shows that the applica- tion was compiled for Integrity systems (Itanium(R) Product Family) in the 32-bit data model. The line shows that one compilation unit was compiled at the default level of optimization (level 01), and the other 50 were compiled at level 02. According to the line, all 51 were compiled without profile-based optimization. The line shows that no compilation units were compiled with the symbolic debug option. Otherwise, the line would show the number of compi- lation units compiled with various combinations of symbolic debug and higher optimization levels. For on/off options like settings listed in parentheses represent a default setting not overridden by a compiler option. Many of the options in the footprint record do not correspond directly to a command-line compiler switch, or have a different spelling, and are included in this report for use by HP support and lab engineers. See cc(1) for a description of supported command-line switches. AUTHOR
was developed by HP. SEE ALSO
cc(1), elfdump(1), odump(1). footprints(1)
All times are GMT -4. The time now is 11:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy