473,804 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

testing on 64/32 Linux/SunOS

I have to have my code done for 32 and 64 bit machines on both Linux and
Solaris. Compiling, not a problem.
Testing 32 is not a problem.
But I get segmentation faults when I test on 64 bit machines.

Here's where my problem comes in. I have this macro:
static char thr_buf[2048];
#define THROW(msg) { sprintf(thr_buf ,"(%s,%s,%d) :
%s",__FILE__,__ FUNCTION__,__LI NE__,msg); throw(thr_buf); }

My test code looks like:
try { NodeNewArb(-20,1,NULL); }
catch(const char* s) { OK(strstr(s,"La yer < 0")); }
The function NodeNewArb looks like:
node_p NodeNewArb(int layer, int npts,xy_p pts)
{
if (layer < 0) THROW("Layer < 0");
There's more but this is as far as it gets, as it should with a -20 for a
layer.

Here's the result of a tb in gbd
Breakpoint 2, NodeNewArb (layer=-20, npts=1, pts=0x0) at Laff.cxx:6122
6122 if (layer < 0) THROW("Layer < 0");
(gdb) p layer
$1 = -20
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
classify_object _over_fdes (ob=0x729e80, this_fde=0x61a9 58) at
unwind-dw2-fde.h:172
172 {
Current language: auto; currently c
(gdb) bt
#0 classify_object _over_fdes (ob=0x729e80, this_fde=0x61a9 58) at
unwind-dw2-fde.h:172
#1 0x0000000000566 9b9 in search_object (ob=0x729e80, pc=0x5651b1) at
unwind-dw2-fde.c:731
#2 0x0000000000566 d95 in _Unwind_Find_FD E (pc=0x5651b1, bases=0x7fbff11 698) at
unwind-dw2-fde.c:997
#3 0x0000000000564 71e in uw_frame_state_ for (context=0x7fbf f115f0,
fs=0x7fbff111d0 ) at /apps/local-source/gcc/gcc-3.4.1/gcc/unwind-dw2.c:1015
#4 0x0000000000564 edf in uw_init_context _1 (context=0x7fbf f115f0,
outer_cfa=0x7fb ff11710, outer_ra=0x549f b6)
at /apps/local-source/gcc/gcc-3.4.1/gcc/unwind-dw2.c:1281
#5 0x0000000000565 1b2 in _Unwind_RaiseEx ception (exc=0xd01980) at
unwind.inc:93
#6 0x0000000000549 fb6 in __cxa_throw (obj=0x0, tinfo=0x0, dest=0) at
/apps/local-source/gcc/gcc-3.4.1/libstdc++-v3/libsupc++/eh_throw.cc:75
#7 0x00000000004c5 2ce in NodeNewArb (layer=-20, npts=1, pts=0x0) at
Laff.cxx:6122
#8 0x000000000043e 343 in t_NodeMalloc () at test.cxx:2867
#9 0x00000000004af 957 in main (argc=1, argv=0x7fbff11b 28) at test.cxx:8321
(gdb) q
The program is running. Exit anyway? (y or n) y

___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455, b-******@ti.com
Jul 23 '05 #1
0 1253

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2456
by: gaool | last post by:
Hello, I try to launch a Python script on SunOS system but I have this error: """Traceback (most recent call last): File "ihm1_1.py", line 3, in ? from Tkinter import * File "/opt/sfw/lib/python2.3/lib-tk/Tkinter.py", line 38, in ? import _tkinter # If this fails your Python may not be configured for Tk
34
2705
by: Keith S. | last post by:
Hi Folks, When converting a double to an int, the result is not as I'd expect on Linux: #include <stdio.h> int main(int argc, char **argv) { double val = 0.24;
17
1836
by: arne.muller | last post by:
Hello, I just had to find out that a program that runs fine under linux and True64 alpha crashed with a segmentation fault under SunOS 5.8. I drilled down and it appears that if the sun qsort gets a vector in which all elements are equivalent, my comparsion function raises SEGSEGV. The problem seems to be that all elements are the same sun qsort always passes NULL as the first element to the comparsion function....
2
4069
by: rockkyy | last post by:
hi all.. I want to implement an rpc client ,whose server is already there.. i am porting the client code from SunOS to linux.. but when i compile the '.x' file using rpcgen the XDR files are not getting created.. only CLNT, SVC and header files are getting created .. is their any way to create the XDR file on linux platform.. i need it becoz the server will be expectin the request in XDR format... plz help ...
1
4246
by: dkhosh | last post by:
The following code works on SunOS but not on MacOS X. On the Mac, the second "cout <<" prints to the screen but the program quits without getting any input. Can anyone explain this? Thanks. (I've read through all the threads I could find to solve this.) // iotest.cc // #include <iostream> using std::cin; using std::cout; using std::endl;
6
10798
by: Cybex | last post by:
I am taking a C++ class and would like to use a Linux based IDE vs C+ + .Net but I am a little lost in how to go about this. I think that the IDE and compilation tools are separate under Linux. I have tried to take code written and tested under C++ .Net and tried compiling it in Linux via gcc but I keep getting errors. The code: #include <iostream> using namespace std;
0
1263
by: candra | last post by:
Learn What Hackers Know? -Unix - Vulnerabilities & Advisories -Unix - Security Tools -Unix - BSD, Freebsd, Etc -Unix - Solaris, Sunos Etc -Unix - Other Flavors (Irix, HPUX, AIX Etc) -Linux - Vulnerabilities & Advisories -Linux - Security Tools -Linux - Security-Oriented Mini- And Micro-Distributions
2
20859
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use some of the tools provided on the command-line. If you hate the command line tools, get over it since you’re bound to be using them at some point in your career. All commands in Linux ARE case sensitive so capital letters are different from lowercase...
0
9711
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
9591
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
10594
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...
1
10331
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,...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4306
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
3831
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.