Closed Bug 355059 Opened 13 years ago Closed 13 years ago
valgrind free memory read warning from multiple FT
_Done _Face calls in ns Font Metrics PS .cpp
When printing http://www.mozilla.com/firefox/all on a trunk build with cairo disabled I get a valgrind warning about reading freed memory (attached). The attached patch fixes the warning. I haven't bothered to figure out the ownership model here -- but it seems to be working well enough except for this issue -- although I suppose I haven't checked for leaks. Then again, this code should be going away for 1.9.
This fixes the warning. I'm not sure who owns the entry object, but this seems like the simplest patch to prevent the object from being accessed after being freed.
Checked in to trunk, although the code isn't used there.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Attachment #240846 - Flags: approval18.104.22.168?
Comment on attachment 240846 [details] [diff] [review] patch approved for 1.8 branch, a=dveditz for drivers
Attachment #240846 - Flags: approval22.214.171.124? → approval126.96.36.199+
I believe the bugs addressed here are responsible for the problems described in bug 336435 (Firefox hangs following printing on Linux). I debugged this a couple of months ago, and attached a patch which fixed several double-free bugs, including the bugs fixed here. However, I also found an additional bug (a failure to increment the reference count on a CharSet following a look-up in fontconfig), which is fixed in the first part of my patch. See: https://bugzilla.mozilla.org/attachment.cgi?id=237126&action=view Can that part of the patch be reviewed and committed soon? (Please let me know if you want me to provide an updated patch). It would be nice to get all of these fixes into the next 1.5.0.x release, as these bugs are having a major impact on our users.
Ah, I now see that the additional bug I referred to was addressed in bug 294879, and a fix has already been checked in, and included in 188.8.131.52. So never mind about reviewing that part of my patch.
Checked in to MOZILLA_1_8_BRANCH.
Attachment #240846 - Flags: approval184.108.40.206?
Comment on attachment 240846 [details] [diff] [review] patch Approved for 1.8.0 branch, a=jay for drivers.
Attachment #240846 - Flags: approval220.127.116.11? → approval18.104.22.168+
Checked in to MOZILLA_1_8_0_BRANCH.
hi david, can you provide steps on how QA can verify this fix on the 1.8 and 1.8.0 branch? thanks.
Whiteboard: [need testcase]
You need to log in before you can comment on or make changes to this bug.