- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- +O2 optimization question - core dump with BUS_ADR...
Operating System - HP-UX
1748266
Members
3031
Online
108760
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2009 08:16 AM
09-03-2009 08:16 AM
+O2 optimization question - core dump with BUS_ADRALN
I have an application running perfectly fine on most other platforms (Linux, Solaris, AIX 32 and 64-bit) but crashes on HP-UX 11.23 IA when compiled with the +O2 optimization option in 64-bit mode. When I re-compile with optimization set to +O1 for a specific function it runs fine. The crash is happening as soon as the function(LinearRingArea) is being invoked.
Both the caller and callee functions are in the same object file. Here is the difference in the assembly code with +O1 and +O2:
O1:
;;; 4713 {
0x9fffffffec88c640:0:
alloc r37=ar.pfs,0,7,1,0
0x9fffffffec88c640:1: mov r38=b0
0x9fffffffec88c640:2:
adds r12=-80,r12;;
0x9fffffffec88c650:0:
adds r9=16,r12
0x9fffffffec88c650:1:
adds r10=32,r12;;
0x9fffffffec88c650:2: nop.i 0x0
0x9fffffffec88c660:0:
stf.spill [r9]=f16,32
0x9fffffffec88c660:1:
stf.spill [r10]=f17,32
0x9fffffffec88c660:2: nop.i 0x0;;
0x9fffffffec88c670:0:
stf.spill [r9]=f18,32
0x9fffffffec88c670:1:
stf.spill [r10]=f19,32
0x9fffffffec88c670:2: nop.i 0x0;;
0x9fffffffec88c680:0:
stf.spill [r9]=f20,16
---Type to continue, or q to quit---
0x9fffffffec88c680:1: mov r35=r33
0x9fffffffec88c680:2:
mov r34=r32;;
O2:
;;; 4713 {
0x9fffffffec88e440:0: adds r10=-1,r32
0x9fffffffec88e440:1:
---Type to continue, or q to quit---
adds r15=8,r33
0x9fffffffec88e440:2: mov r8=pr
0x9fffffffec88e450:0:
adds r16=16,r33
0x9fffffffec88e450:1:
adds r14=-3,r32
0x9fffffffec88e450:2:
adds r11=32,r33;;
0x9fffffffec88e460:0:
ldfd f10=[r15]
0x9fffffffec88e460:1: ldfd f9=[r16]
0x9fffffffec88e460:2: sxt4 r15=r10
LinearRingArea takes a 2 arguments:
1> A point to a structure containing 2 double variables
2> An int.
I need some insights to understand the root cause. Also, are there any compile time options to turn off specific level 2 optimizations? Are the floating point optimizations causing the crash?
Both the caller and callee functions are in the same object file. Here is the difference in the assembly code with +O1 and +O2:
O1:
;;; 4713 {
0x9fffffffec88c640:0
alloc r37=ar.pfs,0,7,1,0
0x9fffffffec88c640:1
0x9fffffffec88c640:2
adds r12=-80,r12;;
0x9fffffffec88c650:0
adds r9=16,r12
0x9fffffffec88c650:1
adds r10=32,r12;;
0x9fffffffec88c650:2
0x9fffffffec88c660:0
stf.spill [r9]=f16,32
0x9fffffffec88c660:1
stf.spill [r10]=f17,32
0x9fffffffec88c660:2
0x9fffffffec88c670:0
stf.spill [r9]=f18,32
0x9fffffffec88c670:1
stf.spill [r10]=f19,32
0x9fffffffec88c670:2
0x9fffffffec88c680:0
stf.spill [r9]=f20,16
---Type
0x9fffffffec88c680:1
0x9fffffffec88c680:2
mov r34=r32;;
O2:
;;; 4713 {
0x9fffffffec88e440:0
0x9fffffffec88e440:1
---Type
adds r15=8,r33
0x9fffffffec88e440:2
0x9fffffffec88e450:0
adds r16=16,r33
0x9fffffffec88e450:1
adds r14=-3,r32
0x9fffffffec88e450:2
adds r11=32,r33;;
0x9fffffffec88e460:0
ldfd f10=[r15]
0x9fffffffec88e460:1
0x9fffffffec88e460:2
LinearRingArea takes a 2 arguments:
1> A point to a structure containing 2 double variables
2> An int.
I need some insights to understand the root cause. Also, are there any compile time options to turn off specific level 2 optimizations? Are the floating point optimizations causing the crash?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2009 12:48 AM
09-04-2009 12:48 AM
Re: +O2 optimization question - core dump with BUS_ADRALN
>The crash is happening as soon as the function(LinearRingArea) is being invoked.
What aCC6 version are you using? The latest is A.06.23, PHSS_39823.
Which instruction? ldfd f10=[r15] ?
>Here is the difference in the assembly code with +O1 and +O2:
You don't have enough instructions for your +O1 code to compare.
>LinearRingArea takes a 2 arguments:
It appears you have reversed them in your description:
LinearRingArea(int x, struct foo *p)
>are there any compile time options to turn off specific level 2 optimizations?
What type? There doesn't seem to be any optimizations yet, other than loading the two double fields.
>Are the floating point optimizations causing the crash?
Not sure. What are the values of r33, r15 and r16? r33 must be 8 byte aligned.
What aCC6 version are you using? The latest is A.06.23, PHSS_39823.
Which instruction? ldfd f10=[r15] ?
>Here is the difference in the assembly code with +O1 and +O2:
You don't have enough instructions for your +O1 code to compare.
>LinearRingArea takes a 2 arguments:
It appears you have reversed them in your description:
LinearRingArea(int x, struct foo *p)
>are there any compile time options to turn off specific level 2 optimizations?
What type? There doesn't seem to be any optimizations yet, other than loading the two double fields.
>Are the floating point optimizations causing the crash?
Not sure. What are the values of r33, r15 and r16? r33 must be 8 byte aligned.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP