Closed Bug 820540 Opened 13 years ago Closed 13 years ago

Some new DMD stacks stop at malloc() on Gonk

Categories

(Core :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20
Tracking Status
firefox19 --- fixed
firefox20 --- fixed
b2g18 --- fixed

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)

References

Details

Attachments

(1 file, 1 obsolete file)

We get a bunch of stacks which start and stop at malloc() on Gonk. I originally thought this was due to the JIT somehow. But actually, it looks more prosaic: I think I forgot to turn on -funwind-tables for JS code. I'm compiling now to see if this fixes the problem.
JS was definitely part of the problem, and fixed by adding -funwind-tables there. Cairo appears to be another perpetrator.
Attached patch Patch, v1 (obsolete) — Splinter Review
This fixes all the places we can't trace into, as far as I can tell.
Attachment #691031 - Flags: review?(mh+mozilla)
I found the offenders by running B2G+DMD in GDB and setting a breakpoint tripped when I saw a stack trace of length 1.
Assignee: nobody → justin.lebar+bug
Comment on attachment 691031 [details] [diff] [review] Patch, v1 Review of attachment 691031 [details] [diff] [review]: ----------------------------------------------------------------- Nice. In js/src/configure.in, you need to modify the MOZ_DEMANGLE_SYMBOLS definition to match configure.in. Likewise for MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS. Bonus points if you add the missing "dnl ===..." line above "Enable trace malloc in js/src/configure.in.
Attached patch Patch, v2Splinter Review
Attachment #691031 - Attachment is obsolete: true
Attachment #691031 - Flags: review?(mh+mozilla)
Attachment #691106 - Flags: review?(mh+mozilla)
Comment on attachment 691106 [details] [diff] [review] Patch, v2 Review of attachment 691106 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/cairo/cairo/src/Makefile.in @@ +13,5 @@ > LIBRARY_NAME = mozcairo > LIBXUL_LIBRARY = 1 > > ifdef GNU_CC > +OS_CFLAGS := $(filter-out -pedantic,$(OS_CFLAGS)) Ouch ::: js/src/configure.in @@ +3500,5 @@ > +if test "$NS_TRACE_MALLOC"; then # trace-malloc disables DMD > + MOZ_DMD= > +fi > +if test "$MOZ_DMD"; then > + USE_ELF_DYNSTR_GC= You can skip USE_ELF_DYNSTR_GC @@ +3501,5 @@ > + MOZ_DMD= > +fi > +if test "$MOZ_DMD"; then > + USE_ELF_DYNSTR_GC= > + AC_DEFINE(MOZ_DMD) You can skip this. @@ +3510,5 @@ > + fi > + > + MOZ_MEMORY=1 # DMD enables jemalloc > + MOZ_REPLACE_MALLOC=1 # DMD enables replace-malloc > + MOZ_DMDV= # DMD disables DMDV You can skip these. @@ +3512,5 @@ > + MOZ_MEMORY=1 # DMD enables jemalloc > + MOZ_REPLACE_MALLOC=1 # DMD enables replace-malloc > + MOZ_DMDV= # DMD disables DMDV > +fi > +AC_SUBST(MOZ_DMD) You can skip this.
Attachment #691106 - Flags: review?(mh+mozilla) → review+
> LIBRARY_NAME = mozcairo > LIBXUL_LIBRARY = 1 > > ifdef GNU_CC > +OS_CFLAGS := $(filter-out -pedantic,$(OS_CFLAGS)) > > Ouch srsly. Should I worry about landing this on branches, given that we're going to change the compile flags for Cairo?
> Should I worry about landing this on branches, given that we're going to change the > compile flags for Cairo? I guess it's not as big a deal now, since we've branched from beta.
(In reply to Justin Lebar [:jlebar] from comment #7) > Should I worry about landing this on branches, given that we're going to > change the compile flags for Cairo? The flags in question are only a bunch of -W (but that includes one -Werror=return-type), -fno-strict-aliasing, -ffunction-sections, -fdata-sections, -pthread, -pipe. Besides -fno-strict-aliasing they are all harmless. I'm tempted to say that if we don't have any problem on m-c, there shouldn't be any problem on branches, provided cairo hasn't changed since 18.
It looks like there's just one change affecting tier-1 platforms in m-c that isn't on Aurora: Bug 813124. Scanning the code, it doesn't appear to do any hanky-panky. So let's say we're probably OK!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment on attachment 691106 [details] [diff] [review] Patch, v2 [Triage Comment] DMD is npotb.
Attachment #691106 - Flags: approval-mozilla-b2g18+
Attachment #691106 - Flags: approval-mozilla-aurora+
(In reply to Justin Lebar [:jlebar] from comment #13) > Comment on attachment 691106 [details] [diff] [review] > Patch, v2 > > [Triage Comment] > DMD is npotb. Hm, that's not entirely true in this situation; we're modifying Cairo's build flags. I still think this is likely safe, however; see comment 10.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: