[Skia] Skia code is linking against libstdc++ operator new on Android

RESOLVED FIXED in mozilla12

Status

()

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Tracking

unspecified
mozilla12
x86
macOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

On android, files within gfx/skia are linking against the libstdc++ allocation functions instead of going through mozalloc.

This is causing crashes when we allocate objects in gfx/2d, and skia attempts to free them (via unref()).

I've got a temporary workaround, moving all allocations into skia itself, but I'd rather figure out why this is and fix it properly.
Instead of linking against stdlib new/free, this turned out be skia having wrappers around malloc/free that were allocating a block header to track allocations.

Allocating objects without this header, and then attempting to adjust for the header when free'ing was causing this issue.
Attachment #587595 - Flags: review?(bas.schouten)
Comment on attachment 587595 [details] [diff] [review]
Use standard malloc on skia

Review of attachment 587595 [details] [diff] [review]:
-----------------------------------------------------------------

From what I understand this might lose us some debug capabilities of Skia so it's a shame. I'm fine with this though as allocation/freeing consistency within our code is important.
Attachment #587595 - Flags: review?(bas.schouten) → review+
https://hg.mozilla.org/mozilla-central/rev/465e3ad31c64
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.