I have a simple program to create a symbol to pass to kdb+ from c
#include k.h
class makeKDBObj
{
public:
K getkobj();
};
K getkobj(){
K T2=0;
S metx= ss((char*)“metx”);
return T2;
}
I have compiled this with a link to c.o
makeKDBObj: makeKDBObj.cpp $(HEADERS)
$(CXX) makeKDBObj.cpp c.o $(CXXFLAGS) $(ROOTFLAGS) -o makeKDBObj
where CXXFLAGS :=-std=c++0x -O3 -pedantic -Wall -Wno-long-long
ROOTFLAGS := $(shell root-config --cflags --libs --ldflags)
I get a segmentation fault, which appears to be happening on S metx= ss((char*)“metx”);
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x0000003768e99dd5 in waitpid () from /lib64/libc.so.6
#1 0x0000003768e3c4a1 in do_system () from /lib64/libc.so.6
#2 0x00002ab4dfe399ad in TUnixSystem::StackTrace() ()
from /home/Root/root/lib/libCore.so
#3 0x00002ab4dfe3c003 in TUnixSystem::DispatchSignals(ESignals) ()
from /home/Root/root/lib/libCore.so
#4 <signal handler called>
#5 0x0000000000404130 in sn ()
#6 0x00000000004028de in main ()
===========================================================
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x0000000000404130 in sn ()
#6 0x00000000004028de in main ()
===========================================================
Has anyone got any suggestions?
Many thanks