I am a bit new to AIX and stuck up with a weird issue. I have two AIX machine and my C++ application is running on one and crashing on the other.
When I checked packages installed (rpm -qa), I observed one difference, for 1st machine all the rpm's are ending with .ppc extension and for 2nd it's not. My cpp app is perfectly running on 2nd machine.
I suspect this can be a cause for this issue but not sure.
PS: Showing the difference between two.
Stack Trace:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xd0bded2c in std::locale::operator=(std::locale const&) () from /opt/freeware/lib/libstdc++.a(libstdc++.so.6)
(gdb) bt
#0 0xd0bded2c in std::locale::operator=(std::locale const&) () from /opt/freeware/lib/libstdc++.a(libstdc++.so.6)
#1 0xd0bdeee0 in std::ios_base::_M_init() () from /opt/freeware/lib/libstdc++.a(libstdc++.so.6)
#2 0xd0bdede4 in std::basic_ios<char, std::char_traits<char> >::init () from /opt/freeware/lib/libstdc++.a(libstdc++.so.6)
#3 0x100b618c in Logging::Logging (this=0x20086438, filename=..., level=4) at Logging.cpp:404
#4 0x1005d96c in main (argc=<error reading variable>, argv=<error reading variable>) at _start_ :141
warning: (Internal error: pc 0x100001e3 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x100001e4 in read in psymtab, but not in symtab.)
Code Snapshot:
string logFile = "test.txt"
Logging* logger = new Logging(logFile,4);
// Logging Constructor
Logging::Logging(const string &filename,loglevel): logfilename(filename),level(loglevel) {
}