[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECmcc user notes file. Does not replace IPMT. |
Notice: | Use IPMT for problems. Newsletter location in note 6187 |
Moderator: | TAEC::BEROUD |
|
Created: | Mon Aug 21 1989 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 6497 |
Total number of notes: | 27359 |
2167.0. "Certain MCC Typedefs Can Cause Nasty Stack Problems" by TOOK::SWIST (Jim Swist LKG2-2/T2 DTN 226-7102) Wed Jan 22 1992 13:03
Warning to MM Developers -
The typedefs in mcc_interface_def.h for MCC data types
MCC_T_Latin1String, MCC_T_OctetString, MCC_T_HexString, and
MCC_T_Expression are defined in terms of their maximum length, namely
"char[65535]". Such types are useful as pointers only since it is
unlikely you really want a variable of that length allocated.
We have had several cases of *very* hard to debug memory clobbers
caused by attempting to put one of the above types on the stack as a
local variable. This caused the thread stack to overflow by so much
that the protected guard pages at the bottom of the stack were in fact
jumped over and random memory was clobbered.
In V1.2, the guard band size will be adjustable to help find stuff like
this, but in the meantime caveat coder.
T.R | Title | User | Personal Name | Date | Lines
|
---|