[profiler markers] "Image Load" markers for data URLs seem to have incorrect innerWindowID values
Categories
(Core :: Graphics: ImageLib, defect, P2)
Tracking
()
People
(Reporter: julienw, Assigned: tnikkel)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #1755032 +++
From a profile, this is the command I use in the console:
ids = [...new Set(filteredMarkers.map(marker => marker.data && marker.data.innerWindowID))].filter(id => id && profile.pages.every(page => page.innerWindowID !== id));
filteredMarkers.filter(marker => marker.data && ids.includes(marker.data.innerWindowID));
On Content Processes, with this command line, I get Image Load markers for data urls.
The STR I use is roughly:
0. Start the profiler.
- Open cnn.com in a tab;
- In another tab, open https://lemonde.fr.
- Capture
The faulty markers are in the thread for lemonde.fr.
Unfortunately firefox crashes with rr and the profiler today, so it's difficult to capture :/ Happy to instrument my local copy with printf or gather some logs if that can help.
Comment 1•4 years ago
|
||
Set release status flags based on info from the regressing bug 1580820
| Reporter | ||
Comment 2•4 years ago
•
|
||
I managed to record a pernosco session after tweaking a recent patch from Florian. Here is the pernosco link: https://pernos.co/debug/bmOx7MB_8uriHZbuxrZ_IQ/index.html
Here is the profile I got: https://share.firefox.dev/3sYpYHJ, with Image Load markers that have their innerWindowID = 1 that's not present in profile.pages.
On a side note, it might be a good idea to not record the full string if it's a data url, I'm afraid of malicious webpages DOSing the profiler...
Updated•4 years ago
|
| Assignee | ||
Comment 3•4 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #2)
On a side note, it might be a good idea to not record the full string if it's a data url, I'm afraid of malicious webpages DOSing the profiler...
Does it not already do that? https://searchfox.org/mozilla-central/rev/ad38c9d1f0a9036c4da5271a849f47342b68adc8/image/ImageFactory.cpp#117
| Assignee | ||
Comment 4•4 years ago
|
||
We're passing a uint64_t to a function that takes a uint32_t.
Bug 1139225 added this.
| Assignee | ||
Comment 5•4 years ago
|
||
Also found bug 1756587 and bug 1756588 by searching the tree for the regular expression 32.*innerwin
| Assignee | ||
Comment 6•4 years ago
|
||
Apparently we don't get compiler warnings for this because -Wconversion isn't on https://clang.llvm.org/docs/DiagnosticsReference.html#wconversion
There is also -Wshorten-64-to-32 which might be a flag that is easier to enable and more of the warnings it finds will be real bugs.
| Assignee | ||
Comment 7•4 years ago
|
||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #6)
Apparently we don't get compiler warnings for this because -Wconversion isn't on https://clang.llvm.org/docs/DiagnosticsReference.html#wconversion
There is also -Wshorten-64-to-32 which might be a flag that is easier to enable and more of the warnings it finds will be real bugs.
I've been investigating this, but the amount of warnings even with that flag is very high.
Updated•4 years ago
|
Updated•4 years ago
|
| Reporter | ||
Comment 10•4 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #3)
(In reply to Julien Wajsberg [:julienw] from comment #2)
On a side note, it might be a good idea to not record the full string if it's a data url, I'm afraid of malicious webpages DOSing the profiler...
Does it not already do that? https://searchfox.org/mozilla-central/rev/ad38c9d1f0a9036c4da5271a849f47342b68adc8/image/ImageFactory.cpp#117
ah, thanks for double checking!
And also thanks for finding all these issues.
Comment 11•4 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
| Assignee | ||
Comment 12•4 years ago
|
||
Kelsey also pointed me to this
I tried adding that to just image/ but it generated a ton of spew for something about our AtomicBitfields implementation. I tried adding just -Wshorten-64-to-32 to just image/, that trips of a lot of spew, nsTArray for example.
Updated•4 years ago
|
I was unable to reproduce this bug using Profiler on Win10. Would you be so kind as to confirm this fix on latest beta/nightly?
Thank you.
| Reporter | ||
Comment 14•4 years ago
|
||
Yes, I'm quite sure I verified it when it landed! Thanks for checking
Marked as Verified based on Comment 14.
Description
•