C语言 ProC 在 10g 上编译并在 11g 上运行



我用oracle 10g编译了一个pro*c源代码,并运行安装了11g的应用程序。应用程序提供核心转储。我从DBX调试中得到以下跟踪:

(dbx) where
current thread: t@1
  [1] _smalloc(0x30, 0x0, 0x1dad44, 0xffffffff7b56350c, 0x0, 0xffffffff7b74eac0), at 0xffffffff7b563350
  [2] malloc(0x2c, 0x23e0, 0x1dac88, 0xffffffff7b5633d8, 0xffffffff7b73e000, 0x2000), at 0xffffffff7b5633c8
  [3] sqlalc(0xffffffff7e79dc20, 0x8, 0x1003bf920, 0x200, 0x0, 0x541c), at 0xffffffff7c2a23c8
  [4] sqlbrl(0xffffffff7e79dc20, 0x1003c0300, 0x1003c0328, 0x1003c02a0, 0xffffffff7fffeab0, 0x1), at 0xffffffff7c2ab1d4
  [5] sqlhvdsc(0x1003c0290, 0xffffffff7e79dc20, 0x8, 0xffffffff7ffff040, 0x122, 0xffffffff7e79dc20), at 0xffffffff7c2c5194
  [6] sqlshv(0xffffffff7e2fb350, 0x1, 0x1003c0290, 0xffffffff7fffec86, 0xa, 0x0), at 0xffffffff7c2c59cc
  [7] sqlatm(0xffffffff7e79df78, 0x100151022, 0x100354330, 0x1, 0x5, 0x1003813c0), at 0xffffffff7c2c72cc
  [8] sqlnst(0xffffffff7c2b5288, 0x85, 0x100150f18, 0x1, 0x0, 0xffffffff7ffff040), at 0xffffffff7c2b5618
  [9] sqlcmex(0x6, 0x1003813c0, 0x910, 0x1, 0x100150f18, 0x0), at 0xffffffff7c2a61ec
  [10] sqlcxt(0x0, 0x100150ec0, 0xffffffff7ffff040, 0x100152312, 0x4d, 0x0), at 0xffffffff7c2a6c44
=>[11] upd_prog_status(status = 30), line 476 in "CCFILT_x.pc"
  [12] main(argc = 3, argv = 0xffffffff7ffff918), line 3698 in "CCFILT_x.pc"

我的问题是是否可以使用 10g 编译源代码并在 11g 上运行它?这个 malloc 错误呢?我读到了一些你必须在 oracle 11g 的代码中给出 malloc 的定义的地方?

感谢和问候

是的,使用 Oracle 10G 编译的应用程序也可能在 Oracle 11G 上运行。但反之亦然是行不通的。

上述错误表明应用程序中存在一些内存泄漏,但跟踪不会告诉您确切的位置。泄漏早已远离踪迹。

最新更新