Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > testing on 64/32 Linux/SunOS

Reply
Thread Tools

testing on 64/32 Linux/SunOS

 
 
Billy Patton
Guest
Posts: n/a
 
      04-26-2005
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__,__LINE__,msg); throw(thr_buf); }

My test code looks like:
try { NodeNewArb(-20,1,NULL); }
catch(const char* s) { OK(strstr(s,"Layer < 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=0x61a95 at
unwind-dw2-fde.h:172
172 {
Current language: auto; currently c
(gdb) bt
#0 classify_object_over_fdes (ob=0x729e80, this_fde=0x61a95 at
unwind-dw2-fde.h:172
#1 0x00000000005669b9 in search_object (ob=0x729e80, pc=0x5651b1) at
unwind-dw2-fde.c:731
#2 0x0000000000566d95 in _Unwind_Find_FDE (pc=0x5651b1, bases=0x7fbff1169 at
unwind-dw2-fde.c:997
#3 0x000000000056471e in uw_frame_state_for (context=0x7fbff115f0,
fs=0x7fbff111d0) at /apps/local-source/gcc/gcc-3.4.1/gcc/unwind-dw2.c:1015
#4 0x0000000000564edf in uw_init_context_1 (context=0x7fbff115f0,
outer_cfa=0x7fbff11710, outer_ra=0x549fb6)
at /apps/local-source/gcc/gcc-3.4.1/gcc/unwind-dw2.c:1281
#5 0x00000000005651b2 in _Unwind_RaiseException (exc=0xd01980) at
unwind.inc:93
#6 0x0000000000549fb6 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 0x00000000004c52ce in NodeNewArb (layer=-20, npts=1, pts=0x0) at
Laff.cxx:6122
#8 0x000000000043e343 in t_NodeMalloc () at test.cxx:2867
#9 0x00000000004af957 in main (argc=1, argv=0x7fbff11b2 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, http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
testing testing 123 neville Computer Support 7 06-28-2005 05:06 PM
testing testing neville Computer Support 16 06-05-2005 09:02 PM
testing testing neville Computer Support 2 05-27-2005 09:57 AM
testing testing 123 daniel edwards Computer Support 4 05-20-2004 10:36 PM
testing--news2004--testing Boomer Computer Support 3 09-24-2003 06:54 PM



Advertisments