English 中文(简体)
这怎么办? [图表]
原标题:What could this be? [program bug]

我有点麻烦,需要帮助。

页: 1

gcc: Xcode version of gcc, 4.2.1

图书馆:gmp, gmpxx

问题:一项功能在最后坠毁,其结果是:

flx_run(94749) malloc: *** error for object 0x7fff706d1500: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT, Aborted.
0x00007fff835cd886 in __kill ()
(gdb) bt
#0  0x00007fff835cd886 in __kill ()
#1  0x00007fff8366deae in abort ()
#2  0x00007fff83585a75 in free ()
#3  0x00000001000bca45 in flxusr::gmp__hyphen_0::_init_ ()
Previous frame inner to this frame (gdb could not unwind past this frame)

我没有在“init的职能中呼吁自由()并且这一功能在封闭式掩饰之前是正确的,因此坠机点必须位于当地物体的 des子上(右面)

不可否认的是:

a) 如果静态地挂钩,该方案(种子)的工作就算不上了,但只有将守则建设成正文和有活力的负荷,才会失败。

b) the program fails the same way with two completely different versions of gmp/gmpxx. [4.3 or something and 5.01]

c) 静态和动态联系版本都在Ubu 10.5 LTS进行罚款

守则由我的编辑编制,不是手写的法典。 用户代码由高级司机方案管理。 该系统成功进行了数百次回归测试。 然而,在这种特殊测试案件中使用了以下手写法:

namespace flx { namespace gmp {
string flx_mpf_get_str(mpf_class const &a)
{
  mp_exp_t x;
  std::string s = a.get_str(x,10,0);
  char b[100];
  std::snprintf(b,100,"e%ld",(long)x);
  return std::string(".")+s+b;
}
}}

but it looks fine to me. The stack frame of the function contains several mpz_class, mpq_class and mpf_class objects.

除了刺./刺.之外,我认为,我唯一可以认为的是,我的运行时间制度或产生的法典正在腐化记忆。 所谓“免费”的地址是可疑的(在离他处附近)。 我制作了一个带有——例如旗帜的刺).版,但没有获得更多的信息(这显示,它是一种没有穿过xx子的 bad子。

我需要一些想法! 现在我没有任何想法。 预支款:

与来文方的联系

http://felix-lang.org:1116/$/home/skaller/felix/build/release-optimized/test/gmp/gmp-0.cpp

梅塔:SO 标志下降 因此,你必须随手复制。

Might as well Bull in the connection to the Felix Code since it was a bit morereadable and has some fun reuff in it(如用户下定义的yn子,如果你去图书馆,你可以看到打上了打字)

http://felix-lang.org:1116/$/home/skaller/felix/build/release-optimized/test/gmp/gmp-0.flx

问题回答

你们从哪里获得感染源? 这可能是32个比照版本(至少在港口没有64个比照来源)。 另一方面,Snow Leopard为64比特(违约)。

我个人将所有法典的编号提高到32倍。 你也可以尝试同样的做法。

br,
Juha

<>strong>edit:https://stackoverflow.com/questions/4369765/how-to-force-usr-bin-gcc-usr-bin-gcc-m32> How to force /usr/bin/gcc -> /usr/bin/gcc -m32?

You can t deallocate memory allocated by a dynamic library. Perhaps that is the problem here. Check out this answer: Shared libraries memory space





相关问题
tell gdb to disassemble "unknown" code

is it possible to configure gdb in order to debug assembly code when there are no debug symbols or no sources available ? I mean showing assembly instruction by assembly instruction when performing a ...

C++ Netbeans debugging issues

I installed netbeans6.7.1 ide for c/c++ also i have mingw/msys cygwin installed and i have given C:Msysin as environment variable path.It has gdb7 version.However wheni run dbugging thru netbeans ...

setting strings in gdb

c++: int main() { string a = "a"; ... ... } when i debug in gdb: (gdb) set var a = "ok" Invalid cast I run the program and pause at a break point after string a has been ...

How to debug programms written in fasm under linux using gdb?

I wrote simple "hello, world" in fasm, and its works, but how i can generate debug info for gdb and edb (Evan s Debugger)? Fasm compiler could only produce debugging symbols in its specific format - "...

How can I display Unicode strings while debugging on linux?

I have been working for some years now as C++ Developer using MS Visual Studio as working platform. Since I privately prefer to use linux, I recently took the chance to move my working environment to ...

Continue to debug after failed assertion on Linux?

When an assertion fails with Visual C++ on Windows, the debugger stops, displays the message, and then lets you continue (or, if no debugging session is running, offers to launch visual studio for you)...

热门标签