Bad magic number

With 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 get 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
my iax.conf:

[general]

bandwidth=high

disallow=all ; same as bandwidth=high
allow=alaw
alow=ulaw
allow=gsm ; Always allow GSM, it’s cool :slight_smile:

jitterbuffer=no
forcejitterbuffer=no

autokill=yes

[####]
type=friend
username=####
context=fromiax

[voiptalk]
type=peer
username=####
secret=####
host=iax5.voiptalk.org

Try upgrading to the latest version of asterisk and see what happens.

It doesn’t work !

I was going to suggest that you make a bug report but I see that you already did. (bugs.digium.com/view.php?id=11289) You wrote there that you are using 1.4.13. The latest is 1.4.14. See if that helps.

It’s the same with the version 1.4.14