No subject
Thu Jan 15 22:29:28 CST 2009
This is incorrect. Since 'my_umask' is a module level variable (file
scope) its value *must* be preserved across function calls, since all
functions within that module share that variable. In addition, since it
is not static, then it becomes an exported symbol from that module and
could be accessed from other modules (compilation units). Without the
compiler being told otherwise, it *must* treat the variable this way,
including placing the symbol for this variable into the run-time symbol
table for the module for the linker to be able to resolve references to
at runtime. With all of this, I do not see how it could ever be placed
into a register, and that's not even taking into account the fact that
the variable can be accessed from multiple functions in app_voicemail
that can be called from various different call paths, and it would not
be possible to ensure that the register that had been assigned was
preserved through all those code paths.
Now, in spite of all of that, making this variable static *is* the right
thing to do, since it does not need to be exported (in fact, for nearly
all modules in Asterisk, file-scope variables should *always* be
static). If this fixes the bug that's great, but I without more evidence
I don't see how the reason why it fixes the bug is what you have
described.
Issue History
Date Modified Username Field Change
======================================================================
2009-04-16 11:03 lmadsen Note Added: 0103322
======================================================================
More information about the asterisk-bugs
mailing list