C++程序core文件有关问题

C++程序core文件问题
大家好,现在有一个程序总是崩溃,一天要重启无数次,每次都有core文件产生。我dbx这个core文件,结果如下:
t@4 (l@4) 被 信号 SEGV(no mapping at the fault address) 终止
0xfec5721c: _free_unlocked+0x004c:      ld       [%i5 - 8], %o3
当前函数是sql_select1
dbx: 警告: 找不到文件 "/usr2/sxunicom/database/DBnew_v1.92_9_dev/src/sql_exec.c"
dbx: 警告: 请参阅'help finding-files'
(dbx) where
当前线程: t@4
  [1] _free_unlocked(0x8, 0x0, 0xe71c8, 0xfed472a4, 0xfed3e3a8, 0x8),位于 0xfec5721c
  [2] free(0x8, 0xff3227c4, 0xe7208, 0xff1f09dc, 0xfed3e3a8, 0xff3356a6),位于 0xfec571bc
  [3] _sqfrcmdtxt(0x2db230, 0x2db234, 0xf61d4, 0xff3093c8, 0x261888, 0xfed41514),位于 0xff2e2554
  [4] _sqremove_cursor(0xfe87a5d8, 0x28da10, 0xff332d38, 0x0, 0xff00, 0x0),位于 0xff2e5e2c
  [5] sqli_curs_free(0x28da10, 0x305294, 0x1006d, 0x0, 0xfe87a490, 0x28da10),位于 0xff2e5128
=>[6] sql_select1(recordTable = CLASS, over = 0, from = 0, to = 2000000000, d_count = 1),第 2741 行"sql_exec.c" 中
  [7] sql_process1(str = 0x2c8d90 "SELECT related_bsc FROM ne_cell WHERE equip_name =  '25612'", recordTable = CLASS, over = 0, from = 0, to = 2000000000),第 2619 行"sql_exec.c" 中
  [8] sqlExec1(str = 0x2c8d90 "SELECT related_bsc FROM ne_cell WHERE equip_name =  '25612'", recordTable = CLASS, over = 0, from = 0, to = 2000000000),第 2548 行"sql_exec.c" 中
  [9] g_exec_sql(sql = 0x2c8d90 "SELECT related_bsc FROM ne_cell WHERE equip_name =  '25612'", rec = CLASS, p_over = 1),第 1785 行"common_ope.cpp" 中
  [10] exec_sql(sql = CLASS, rec = CLASS),第 1812 行"common_ope.cpp" 中
  [11] alarmObjAndNeMap(alarmInfo = CLASS),第 419 行"ZteRadioProcess.cpp" 中
  [12] iFunZteRadioAnalyzeAlarm(sOrgReportBuff = CLASS),第 331 行"ZteRadioProcess.cpp" 中
  [13] handlerAlarmList(data = (nil)),第 91 行"main.cxx" 中

ZteRadioProcess.cpp的419行为:ret = exec_sql((char *)sql.c_str(),rs1);
想请教一下大家,这是因为什么错误导致的啊?用的是informix数据库
------解决方案--------------------
(char *)sql.c_str()

人家返回const char*, 你是咋转成char*的.
------解决方案--------------------
将表ne_cell的记录数减少,如果太大的话。
假设表ne_cell有自增字段sno
SELECT related_bsc FROM ne_cell WHERE equip_name = '25612'
改为
SELECT related_bsc FROM ne_cell WHERE sno>100000 and equip_name = '25612'
其中100000根据实际需要取值