[asterisk-dev] [Code Review] Out-of-tree modules can fail because of compiler flag differences.

Jason Parker jparker at digium.com
Wed Mar 3 01:08:38 CST 2010


Kevin Fleming wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/508/#review1623
> -----------------------------------------------------------
>
>
> Another thought came to mind this evening... it may be a bit hard to explain, but I'll try.
>
> It will be important that after this change is committed, if any functions (not macros) that will be part of the ABI have names that were part of the ABI before, but have different prototypes, they *must* have different names. It's imperative that anyone who upgrades to a new version of Asterisk with these changes who has binary modules of any kind get symbol resolution errors at module load time, instead of random crashes and other bizarre behavior.
>
> - Kevin
>   
This could get tricky.  You have to remember that nearly all of these 
functions were static inline in lock.h, in the non-DEBUG_THREADS case.  
Out-of-tree modules would likely contain a copy (really, dozens of copies).

I'm not very familiar with how to compiler does things.  Would those 
inlined functions *actually* get called by the module, or would it have 
literally replaced the function call with the code inside it?  I believe 
the answer is mostly the latter, but generally "It depends."


It seems like either it's not as bad as you suggest, or it's much worse 
and possibly unavoidable.


Thoughts?



More information about the asterisk-dev mailing list