[Serdev] Re: [Serusers] SER crashed with DBG_QM_MALLOC on

Durgani, Prakash B. PBDurgani at west.com
Fri Mar 25 19:48:53 UTC 2005


Hi Marian,

I have similar issues where I invoke parse_msg function (from a custom
module) which in turns invokes pkg_malloc in parse_headers().  And
pkg_malloc then core dumps, if compiled with DBG_QM_MALLOC.

Here is what I get from gdb:

qm_malloc (qm=0x80f8660, size=32, file=0x80a5bba "parser/msg_parser.c", 
    func=0x80a5dfe "parse_headers", line=278) at mem/q_malloc.c:290

Now I have pretty much gone through our module's code by myself and
through code reviews, and ironed all the possible memory related issues
we came across, and I'll keep looking for more.  

Any suggestions.  One thing is that I am using the standard malloc and
free in our custom module.  Can mixing malloc and pkg_malloc cause
problems?

-----Original Message-----
From: serdev-bounces at iptel.org [mailto:serdev-bounces at lists.iptel.org] On
Behalf Of Marian Dumitru
Sent: Friday, March 25, 2005 5:06 AM
To: szj
Cc: serdev at lists.iptel.org; serusers at lists.iptel.org
Subject: [Serdev] Re: [Serusers] SER crashed with DBG_QM_MALLOC on

Hi Sun Zongjun,

Looks like you discover a bug of yours - you have a buffer overflow 
(write more than allocated) in the added functions. Only when compiled 
with DBG_QM_MALLOC, extra checkings to detect such memory bugs are 
performed.

Best regards,
Marian

szj wrote:
>  I tested SER which have beed mofified by me.
> The SER crahed with DBG_QM_MALLOC on, it report
> 
>  >qm_*: prev. fragm. tail overwritten(c0003433, 
> abcdefed)[0x814f284:0x814f29c]!
> this happened in one of my function which called pkg_malloc().
> this function is located in the tm module.
> 
>  But if comment the DBG_QM_MALLOC in the
> Makefile.defs , then compile SER, it never
> crashes.
>  Who can tell me what that mean??
>  Thanks for your help.
> 
> Best Regards.
> Sun Zongjun
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers


-- 
Voice Sistem
http://www.voice-sistem.ro

_______________________________________________
Serdev mailing list
serdev at lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serdev




More information about the Serdev mailing list