Closed
Bug 820540
Opened 13 years ago
Closed 13 years ago
Some new DMD stacks stop at malloc() on Gonk
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)
References
Details
Attachments
(1 file, 1 obsolete file)
4.51 KB,
patch
|
glandium
:
review+
justin.lebar+bug
:
approval-mozilla-aurora+
justin.lebar+bug
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•13 years ago
|
||
JS was definitely part of the problem, and fixed by adding -funwind-tables there. Cairo appears to be another perpetrator.
Assignee | ||
Comment 2•13 years ago
|
||
This fixes all the places we can't trace into, as far as I can tell.
Attachment #691031 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 3•13 years ago
|
||
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 4•13 years ago
|
||
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.
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #691031 -
Attachment is obsolete: true
Attachment #691031 -
Flags: review?(mh+mozilla)
Attachment #691106 -
Flags: review?(mh+mozilla)
Comment 6•13 years ago
|
||
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+
Assignee | ||
Comment 7•13 years ago
|
||
> 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?
Assignee | ||
Comment 8•13 years ago
|
||
> 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.
Comment 9•13 years ago
|
||
(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.
Assignee | ||
Comment 10•13 years ago
|
||
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!
Assignee | ||
Comment 11•13 years ago
|
||
Comment 12•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Assignee | ||
Comment 13•13 years ago
|
||
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+
Assignee | ||
Comment 14•13 years ago
|
||
(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.
Comment 15•13 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•