cancel
Showing results for 
Search instead for 
Did you mean: 

Rogue Wave runtime error

 
Highlighted
Occasional Advisor

Rogue Wave runtime error

The following piece of sample code executes without any error:
RWCString* objStr = new RWCString("This is Rogue Wave String");
cout << "RWCString: Data - " << objStr->data() << endl;
cout << "RWCString: Data Length - " << objStr->length() << endl;

The following piece of sample code gives segmentation fault at run time:
const char* sData = "A Test String\0";
RWCString objStr2(sData);
cout << "RWCString: Data - " << objStr2.data() << endl;
cout << "RWCString: Data Length - " << objStr2.length() << endl;

The platform is HP UX 10.20. The compiler:
> what /usr/bin/CC
/usr/bin/CC:
HP C++ HPCPLUSPLUS A.10.22

The make commands are:
ATest: ATest.o startup.o
CC -g -v -Wl,+s -I/opt/CC/include/CC -I/opt/rogue -I/usr/include -L/opt/rogue/lib -L/opt/CC/lib -L/usr/lib -l++ -ltls0s -lrwtool -lCsup -lstream -lstd ATest.o startup.o -o ATest

.C.o:
CC -g -v -Aa -I/opt/CC/include/CC -I/opt/rogue -I/usr/include -L/opt/rogue/lib -L/opt/CC/lib -L/usr/lib $? -c $@

Any suggestion is welcome.

Thanks.
Sanjib.
2 REPLIES 2
Highlighted
Honored Contributor

Re: Rogue Wave runtime error

Not into coding. But your are getting error with sement violation. If you tusc(trace unix system calls) tool, try running program with tusc.
tusc -vfp "program"

Seems that you are hitting maxssiz or maxdsiz values.

Anil
There is no substitute to HARDWORK
Highlighted
Occasional Advisor

Re: Rogue Wave runtime error

This doesn't seem to be a problem with maxssize or maxdsize limits.
The same sample program works without errors on HP UX 11.00. Only difference is in the make (used aCC compiler):
CXX = aCC

CXXINC = -I/opt/rogue -I/opt/aCC/include -I/usr/include

CXXLIBDIR = -L/opt/rogue/lib -L/opt/aCC/lib -L/usr/lib
CXXLIB = -ltls0s -lrwtool

CXXFLAGS = -g -v -Aa +DA1.1 -D__cplusplus__
LDFLAGS = -Wl,+s

ATest: ATest.o startup.o
@echo "Building executable..."
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXXINC) $(CXXLIBDIR) $(CXXLIB) ATest.o startup.o -o ATest

.C.o:
@echo "Compiling " $?
$(CXX) $(CXXFLAGS) $(CXXINC) $(CXXLIBDIR) $? -c $@