473,781 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To port our C++ Solaris 9, Studio 8 application to HP-UNIX 11i aCC environment

2 New Member
Dear Friends,

I need some help regarding to port our C++ Solaris 9, Studio 8 application to HP-UNIX 11i aCC environment.

Our same code in Solaris, after porting to HP-UNIX, exiting by the SIGBUS signal at some strange point, at the line, where we are doing "memset" of one of our 'big' structure (local variable, 74120 Bytes)

--------------------------------------
Program received signal SIGBUS, Bus error
si_code: 0 - BUS_UNKNOWN - Unknown Error.
[Switching to thread 3 (system thread 6992034)]
0x77f021f8 in <unknown_proced ure> + 0xc0 () from /usr/lib/libc.2
(gdb) bt
#0 0x77f021f8 in <unknown_proced ure> + 0xc0 () from /usr/lib/libc.2
#1 0x1664d0 in DIA_UTIL::_mems et (s=0x77231248, c=0, n=74120)
at AAAOSWrapper.cp p:28
#2 0x104b44 in AAADiaMsgHandle r::handleDiamet erMessage (this=0x401b012 8,
buffer=0x772301 68 "\001", len=260, fd=14) at AAADiaMsgHandle r.cpp:83
#3 0x628dc in AAAIfHandler::s erviceRequest (this=0x4006566 8,
buffer=0x772301 68 "\001", len=260, fd=14) at AAAIfHandler.cp p:704
#4 0x14746c in AAAThreadServic e::runThread (this=0x4008a0d 8, inIndex=0)
--------------------------------------

Another thing we observed is that, HP gdb can not find any "code instruction" in the binary, at the line where we declared our variable, which was giving BUS error at 'memset'.
------------------------------------------------------------------------------- ---------
bash-2.03$ gdb dfn
HP gdb 5.4.0 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00
and target hppa1.1-hp-hpux11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.4.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
(gdb) break AAADiaMsgHandle r.cpp:82
warning: Line 82 in file "AAADiaMsgHandl er.cpp" does not have instructions. Plac
ing breakpoint on the next available source line.
Breakpoint 1 at 0x104b2c: file AAADiaMsgHandle r.cpp, line 83 from ./obj/dfn.
------------------------------------------------------------------------------- ---------

We use the following procedure regarding Solaris to HPU porting.
1) Since we use POSIX system call, so do not face to change system API, apart from some SOCKET api signature like 'accept'.
2) compile option: aCC -g -v -DHP_UX -AA -z -ext +u1 -mt
3) link option: -lpthread -lrt -lm -lnsl

HPU Version: HP-UX telco03 B.11.23 U 9000/800 908196403 unlimited-user license
aCC Version: aCC: HP ANSI C++ B3910B A.03.70

If anyone can help me in this problem, I will be very helpful.

Thanks in advance,
Regards,
Nilanjan
Aug 11 '07 #1
2 1685
JosAH
11,448 Recognized Expert MVP
A bus error is caused by trying to access a mis aligned data type (e.g. ints should
be aligned at 4 byte boundaries etc.) I don't know what aCC's flags are doing there.
Does any of them have to do with alignment of structs or similar? Is there some
'struct packing' flag active?

kind regards,

Jos
Aug 11 '07 #2
nsarkar
2 New Member
A bus error is caused by trying to access a mis aligned data type (e.g. ints should
be aligned at 4 byte boundaries etc.) I don't know what aCC's flags are doing there.
Does any of them have to do with alignment of structs or similar? Is there some
'struct packing' flag active?

kind regards,

Jos
Hello Jos,
Thank you for reply. We found the root cause of the problem. In HP-UNIX thread stack size by default is very small (64K), compared with other OS like linux (10MB). So our big structure was overflowing the smaller thread stack on HP-UX and causing the issue. After setting some big value with pthread_attr_se tstacksize(), it is working :-)

Regards,
Nilanjan
Aug 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1784
by: Volker | last post by:
Hello, i want to compiled PHP 4.3.3 under Solaris 8. My Configuration: Solaris Version 5.8 gcc Version 3.2 PHP 4.3.3 The compile prozess stopped by the compiling
7
5038
by: Paul Moore | last post by:
I'm looking for binaries of Python (2.3.4, preferably) which run on Solaris and HP-UX. I need to be able to install them as a non-root user (hence, to a private directory, something like ~/bin). Do such things exist, and if so where would I find them? I'm not a Unix admin, so if the answer is a pointer to a well-known archive site, I'd appreciate that. There was nothing I could find at python.org. Sadly, I'm not sure that any of the...
1
2084
by: Rudy Ko | last post by:
Dear All, I have Apache using port 80. So I changed IIS to use port 8000 as default web service. After that all my .net projects were not able to load into Visual Studio .net. Do you know how to configure Visual Studio .net to load web projects from port 8000? Thanks for the help!!! Thanks, Rudy
0
2596
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project: OSTDLL, Configuration: Debug Win32 ------ Compiling... StdAfx.cpp
0
774
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project: OSTDLL, Configuration: Debug Win32 ------ Compiling... StdAfx.cpp
0
913
by: MichaelR | last post by:
I have an ASP.NET application that I coded with a text editor and command line compiler. I'm trying to port it to Visual Studio for the IDE tools and debugger, but am having a lot of problem with code that works in my original app and not in Visual Studio. For example, my application has a component dll with some utility functions in it. One of the functions is accessing the application configuration which is a serializable object...
0
1231
by: amjad | last post by:
Dear All, I am using Visual Studio beta 2005 beta 2 with ASP.Net 2.0 and C#.I run the application and it work correctly with http://localhost:port/projectname/page but not with http://computername:port/projectname/page on other computer in the network or even on the same computer with http://computername:port/projectname/page what we have to do to make web application running running on other machine in the network.I select File Systems...
1
10919
by: henrycortezwu | last post by:
Hi All, I'm trying to connect to a virtual port (COM19, OUTGOING, "Bluetooth Serial Port") using VS2005 System.IO.Ports. When I ran the ff code below here's what happens. 1) VS2005 Compiles w/o errors 2) My Nokia 6600 prompted me the message "Accept Connection request from DEMON?" note: DEMON is my computers name. 3) Using my Nokia 6600, I hit the button that refers to the "Yes"
4
2030
by: Christopher Tidy | last post by:
Hi folks, I have a Sun workstation which doesn't have USB. I want to be able to download photos from SmartMedia cards onto the workstation. As far as I know there are no drivers available for parallel port SmartMedia card readers for Solaris. I have some experience of programming in C++ and a lot of experience of PHP. Can anyone give me an idea of how hard it would be to write a driver for the card reader for Solaris? Best wishes,
0
901
by: uupi_duu | last post by:
Hello I have installed Visual Sudio Team System 2005 and I'm develping ASP.NET 2.0 application. There is one problem that I can't understand: when I launch my ASP.NET WebApplication in Studio's internal Web Server it gives a dynamic port number but in browser it's decremented by 2. E.g. Studio's Intermal Web Server says that Web Application is in port 3456 but browser search that page from port 3454. What in earth can case this? Can...
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.