[asterisk-dev] Bad magic number error

Christophe Saigne csaigne at free.fr
Sat Nov 17 01:56:28 CST 2007

I guess it's not the right place to post this, but i got no response  
on users forum.

With latest versions of asterisk using astobj2.c file I have an error  
Bad magic number when I receive a IAX call and Asterik quit.
All works fine in 1.4.10 version.

Here is the function in astobj2.c wich give the error:

* \brief convert from a pointer _p to a user-defined object
* \return the pointer to the astobj2 structure
static inline struct astobj2 *INTERNAL_OBJ(void *user_data)
struct astobj2 *p;

if (!user_data) {
ast_log(LOG_ERROR, "user_data is NULL\n");
return NULL;

p = (struct astobj2 *) ((char *) user_data - sizeof(*p));
if (AO2_MAGIC != (p->priv_data.magic) ) {
ast_log(LOG_ERROR, "bad magic number 0x%x for %p\n", p- 
 >priv_data.magic, p);
p = NULL;

return p;

Asterisk run on Mac osx ppc with Tiger 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20071117/2962ac04/attachment.htm 

More information about the asterisk-dev mailing list