Closed Bug 417903 Opened 16 years ago Closed 16 years ago

nsStackWalker crash when _SymGetLineFromAddr64 fails

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file)

Attached patch fixSplinter Review
SymGetModuleInfoEspecial64 has no way to indicate when _SymGetLineFromAddr64 fails. When _SymGetLineFromAddr64 fails, lineInfo in NS_DescribeCodeAddress is uninitialized and we crash in PL_strncpyz(aDetails->filename, lineInfo.FileName, sizeof(aDetails->filename)).

I hit this doing refcount logging on Windows. My fix is just to zero out aLineInfo if SymGetModuleInfoEspecial64 fails, and checking lineInfo.FileName for null before we use the line number data.
Attachment #303697 - Flags: review?(benjamin)
Attachment #303697 - Flags: review?(benjamin) → review+
Comment on attachment 303697 [details] [diff] [review]
fix

Simple fix to prevent a crash during stack walking. I don't think we actually do any stack walking in release builds so this is pretty safe...
Attachment #303697 - Flags: approval1.9+
Comment on attachment 303697 [details] [diff] [review]
fix

oops ... Simple fix to prevent a crash during stack walking. I don't think we actually
do any stack walking in release builds so this is pretty safe...
Attachment #303697 - Flags: approval1.9+ → approval1.9?
Comment on attachment 303697 [details] [diff] [review]
fix

a=beltzner for 1.9
Attachment #303697 - Flags: approval1.9? → approval1.9+
checked in
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: