[Qt-interest] In QtScript,QScriptEngine::evaluate coredump!!

lvbing lvbing lvbing1981 at gmail.com
Fri Apr 15 14:13:39 CEST 2011


Platform: HPUX-64
Compile: aCC
Qt: 4.5.2

I have an application,when call the QtScript,it will be coredump! use the
GDB to debug the core file,it tell me:
in function bool QScriptParser::parse(QScriptEnginePrivate *driver),when
call the function:

inline void QScriptParser::reallocateStack()
{
    if (! stack_size)
        stack_size = 128;
    else
        stack_size <<= 1;

    sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size *
sizeof(Value)));
    state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size *
sizeof(int)));
    location_stack = reinterpret_cast<Location*> (qRealloc(location_stack,
stack_size * sizeof(Location)));
}

the coredump is in qRealloc function.

and in qRealloc function,the sym_stack is 0,stack_size is 128,the
sizeof(Value) is 8.
all parameter is correct!

but when call the qRealloc(sym_stack,stack_size * sizeof(Value)),the
application is coredump.

so who know it why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110415/601e747b/attachment.html 


More information about the Qt-interest-old mailing list