Closed
Bug 282806
Opened 20 years ago
Closed 7 years ago
Using _alloca in a loop can overflow stack warning in nsDispatchSupport.cpp
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: David.R.Gardiner, Assigned: dbradley)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 PREfast static code analysis warning: nsdispatchsupport.cpp(78) : warning 263: Using _alloca in a loop. This can quickly overflow stack. problem occurs in function 'ClassIsListed' Line 78 is this: if(SUCCEEDED(::CLSIDFromString(T2OLE(szCLSID), &clsidToCompare)) && I think this is related to the T2OLE macro. In http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_atl_string_conversion_macros.asp they mention that the ATL 7.0 macros are better behaved. Not sure if we can require ATL 7.0 though. -dave Reproducible: Always Steps to Reproduce:
Comment 1•20 years ago
|
||
Reporter, please file xpconnect bugs against their component. /be
Assignee: general → dbradley
Component: JavaScript Engine → XPConnect
| Assignee | ||
Comment 2•20 years ago
|
||
That conversion should be moved outside of the loop. I'll post a patch shortly. It's such an innocent looking macro. What it actually does is allocate space on the stack for each invocation and that doesn't get released until the function exists.
Status: NEW → ASSIGNED
| Reporter | ||
Comment 3•20 years ago
|
||
Sorry about picking the wrong component - I knew the code was in the JS hierarchy, and even checked Bugzilla's component descriptions (but i only looked around the Javascript one :-( ). It might be worth updating the Javascript description to note that XPConnect has a separate component. -dave
Updated•18 years ago
|
QA Contact: pschwartau → xpconnect
Comment 4•7 years ago
|
||
I don't see T2OLE anywhere.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•