The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Memory error causing reboot hcclnoodles SUN Solaris 1 11-08-2006 04:09 AM
Explorer causing syslog error hcclnoodles SUN Solaris 8 09-25-2006 06:11 AM
Some env setting is causing the script not to work ? uuser Shell Programming and Scripting 1 03-02-2006 11:27 AM
Causing a disk to be corrupt Yummator UNIX for Dummies Questions & Answers 1 03-24-2004 07:36 PM
HTML is causing problems Perderabo Post Here to Contact Site Administrators and Moderators 4 06-04-2003 06:46 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-05-2008
Registered User
 

Join Date: Jun 2008
Posts: 1
Stumble this Post!
HP-UX 64 compilation causing some code to seg fault

Hello everyone,

Today we are attempting to port some legacy C code to a 64 HP-UX machine at my company and there is kind of a strange error we ran into.

there is a small function they have defined called zgetenv that
accepts a char* and basically just does some null checking and returns
getenv(char*)

the function works fine if i copy it into the file im attempting to recompile and change nothing other than the name of the function.
but when i attempt to call this function from the library that we have recompiled for the 64 bit machine I get a segmentation fault on the
returned value if i call a strlen or strcpy on it.

the strange thing is that this function is being called all over the place in this code and it only gives seg faults in this one module for some reason...

the only possible problem i can think of would be that we havent correctly linked this module to the new 64 bit compilation or something but I dont think that would result in a segmentation fault...

I am really really lost and any help would be much appreciated.

Thanks, Eric
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:54 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0