Closed
Bug 1156300
Opened 7 years ago
Closed 6 years ago
FixFilenameCase doesn't fix up directory names
Categories
(Toolkit :: Crash Reporting, defect)
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: away, Assigned: ted)
References
Details
Attachments
(1 file)
The file links on this crash report point to 'libglesv2' when it should be 'libGLESv2': https://crash-stats.mozilla.com/report/index/0f483195-ad7b-4096-a594-47b212150404
Assignee | ||
Comment 1•7 years ago
|
||
I think nowadays we could use GetFinalPathNameByHandle: https://msdn.microsoft.com/en-us/library/windows/desktop/aa364962.aspx
Assignee | ||
Comment 3•7 years ago
|
||
This bug is lacking context, but: https://dxr.mozilla.org/mozilla-central/rev/aa90f482e16db77cdb7dea84564ea1cbd8f7f6b3/toolkit/crashreporter/tools/symbolstore.py#733 When we dump symbols from PDB files we attempt to normalize the case of source filenames to match what's on the filesystem. Visual C++ tries its hardest to make life difficult for us by using arbitrary case. Unfortunately until recently there weren't actually any APIs for getting the canonical filename case, so this is a PITA.
Who do I need to bribe to get this fixed?
Flags: needinfo?(ted)
![]() |
||
Comment 7•6 years ago
|
||
I was just stymied by this bug. See https://bugzilla.mozilla.org/show_bug.cgi?id=1262351#c6.
Assignee | ||
Comment 8•6 years ago
|
||
I will fix this when I'm back home with my Windows machine on Friday.
Assignee: nobody → ted
Flags: needinfo?(ted)
Assignee | ||
Comment 9•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dd359dac5063
Assignee | ||
Comment 10•6 years ago
|
||
I did `mach buildsymbols` with this patch locally, and grepping xul.sym file it produced shows lines like: ``` FILE 40997 hg:192.168.1.10//build/mozilla-central:dom/indexedDB/ActorsChild.h:d9b1a9829c8e ``` So this seems to do the trick. (Also I wrote tests for it, and they pass, so that's nice.) Try push just to sanity check I didn't break anything in weird ways.
Assignee | ||
Comment 11•6 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/45451/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/45451/
Attachment #8739945 -
Flags: review?(gps)
Assignee | ||
Comment 12•6 years ago
|
||
Apparently Python 3 has os._getfinalpathname on Windows that calls this under the hood: https://hg.python.org/cpython/file/v3.5.1/Modules/posixmodule.c#l3801 That would have made this patch easier!
Updated•6 years ago
|
Attachment #8739945 -
Flags: review?(gps) → review+
Comment 13•6 years ago
|
||
Comment on attachment 8739945 [details] MozReview Request: bug 1156300 - symbolstore.py FixFilenameCase doesn't fix up directory names. r?gps https://reviewboard.mozilla.org/r/45451/#review42025 ::: toolkit/crashreporter/tools/symbolstore.py:765 (Diff revision 1) > + size = ctypes.windll.kernel32.GetFinalPathNameByHandleW(handle, > + None, > + 0, > + 0) > + buf = ctypes.create_unicode_buffer(size) > + if ctypes.windll.kernel32.GetFinalPathNameByHandleW(handle, > + buf, > + size, > + 0) > 0: I would have allocated a fixed length buffer and called GetFinalPathNameByHandleW once then sliced. But meh.
Assignee | ||
Comment 14•6 years ago
|
||
https://reviewboard.mozilla.org/r/45451/#review42025 > I would have allocated a fixed length buffer and called GetFinalPathNameByHandleW once then sliced. But meh. Unfortunately this is the only sensible way to handle arbitrary path sizes. I, too, hate the Win32 API for this, but it's the best you can do with C.
Assignee | ||
Comment 15•6 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #9) > https://treeherder.mozilla.org/#/jobs?repo=try&revision=dd359dac5063 I downloaded the symbols from this build to further sanity check and they look sensible: ``` FILE 174525 hg:hg.mozilla.org/try:dom/indexedDB/IndexedDatabase.h:c92a58752328 ```
Comment 17•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7fb9838b488a
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Assignee | ||
Comment 18•6 years ago
|
||
I did a test crash and it looks good: https://crash-stats.mozilla.com/report/index/23ba3e17-ff30-41e8-96b9-8db122160412
You need to log in
before you can comment on or make changes to this bug.
Description
•