nsStackWalker crash when _SymGetLineFromAddr64 fails

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: roc, Assigned: roc)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 303697 [details] [diff] [review]
fix

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)

Updated

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.