If you write a program and link with the libocci provided with the instantclient package (which is compiled with gcc 3.2 and linking with libstdc++.so.5) you will get into trouble with memory management of the c++ std:: objects (namely vector, list) cause of mixing with different libstdc++ libraries and gcc versions. We should consider in replace the libocci.so with the one provided here (http://www.oracle.com/technology/tech/oci/occi/occidownloads.html) cause it will be compatible with Reproducible: Always Steps to Reproduce: 1. Compile and run a simple occi program accessing some Metadata of the database. Actual Results: Program is crashing upon deallocating std::vector returned from some occi functions. Expected Results: It should free the objects correctly Replacing libocci.* with this version makes the program run fine: http://www.oracle.com/technology/tech/oci/occi/occidownloads.html
Testing program: int test(int argc, char **argv) { const string userName = "........."; const string password = "...."; const string connectString = ".."; Environment *env = Environment::createEnvironment(); { Connection *conn = env->createConnection(userName, password, connectString); Statement *stmt = conn->createStatement("SELECT * FROM TEST_TABLE"); ResultSet *rs = stmt->executeQuery(); vector<MetaData> md = rs->getColumnListMetaData(); for (int i = 0; i < md.size(); i++) cout << "Column name: " << md[i].getString(MetaData::ATTR_NAME) << endl; stmt->closeResultSet(rs); conn->terminateStatement(stmt); env->terminateConnection(conn); } Environment::terminateEnvironment(env); return 0; } this produce: Column name: ID *** glibc detected *** double free or corruption (!prev): 0x08c52568 *** Aborted applying OCCI libraries compiled with gcc 3.4.5 (from the link) this runs as expected.
Please try again w/ 11.2*. Please re-open if this still an issue then.