VMPI_captureStackTrace does not compile for either 32-bit or 64-bit x86 Linux

RESOLVED FIXED in Q3 11 - Serrano

Status

Tamarin
Garbage Collection (mmGC)
P3
normal
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Brent Baker, Assigned: Tommy Reilly)

Tracking

(Blocks: 1 bug)

unspecified
Q3 11 - Serrano
x86
Linux
Bug Flags:
flashplayer-injection -
flashplayer-qrb +
flashplayer-bug +

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
There are 2 different errors when compiling the memory profiler on linux (different between 32bit and 64bit). I am recording as a single bug for now, but I can separate into 2 bugs if desired.


Compiling linux32 with memory profiler enabled (gcc 4.3.3) 
../configure.py --enable-shell --target=i686-linux --enable-memory-profiler

VMPI/MMgcPortUnix.cpp: In function ‘bool VMPI_captureStackTrace(uintptr_t*, size_t, uint32_t)’:
VMPI/MMgcPortUnix.cpp:538: error: comparison between signed and unsigned integer expressions
VMPI/MMgcPortUnix.cpp:541: error: ‘sintptr’ was not declared in this scope
VMPI/MMgcPortUnix.cpp:541: error: expected primary-expression before ‘)’ token
VMPI/MMgcPortUnix.cpp:541: error: expected `)' before ‘ebp’


Compiling linux64 with memory profiler enabled (gcc 4.3.3) 
../configure.py --enable-shell --target=x86_64-linux --enable-memory-profiler

./libMMgc.a(GCHeap.o): In function `MMgc::GCHeap::AllocHook(void const*, unsigned long, unsigned long)':
GCHeap.cpp:(.text+0xee9): undefined reference to `VMPI_spyCallback()'
./libMMgc.a(GCHeap.o): In function `MMgc::GCHeap::DestroyInstance()':
GCHeap.cpp:(.text+0x1f01): undefined reference to `VMPI_spyTeardown()'
./libMMgc.a(GCHeap.o): In function `MMgc::GCHeap::GCHeap(MMgc::GCHeapConfig const&)':
GCHeap.cpp:(.text+0x7600): undefined reference to `VMPI_spySetup()'
./libMMgc.a(GCHeap.o): In function `MMgc::GCHeap::GCHeap(MMgc::GCHeapConfig const&)':
GCHeap.cpp:(.text+0x79d0): undefined reference to `VMPI_spySetup()'
./libMMgc.a(GCMemoryProfiler.o): In function `MMgc::MemoryProfiler::DumpSimple()':
GCMemoryProfiler.cpp:(.text+0x13bd): undefined reference to `VMPI_captureStackTrace(unsigned long*, unsigned long, unsigned int)'
./libMMgc.a(GCMemoryProfiler.o): In function `MMgc::MemoryProfiler::MemoryProfiler()':
GCMemoryProfiler.cpp:(.text+0x1bf5): undefined reference to `VMPI_hasSymbols()'
./libMMgc.a(GCMemoryProfiler.o): In function `MMgc::MemoryProfiler::MemoryProfiler()':
GCMemoryProfiler.cpp:(.text+0x1cb5): undefined reference to `VMPI_hasSymbols()'
./libMMgc.a(GCMemoryProfiler.o): In function `MMgc::MemoryProfiler::GetStackTraceLocked()':
GCMemoryProfiler.cpp:(.text+0x21f8): undefined reference to `VMPI_captureStackTrace(unsigned long*, unsigned long, unsigned int)'
Flags: flashplayer-qrb?
Flags: flashplayer-bug+
(Reporter)

Comment 1

7 years ago
Created attachment 511365 [details] [diff] [review]
Remove memory profiler testing from code coverage

Need to remove the building and testing of the memory profiler from code coverage until this issue is resolved.
Attachment #511365 - Flags: review?(dschaffe)
(Reporter)

Updated

7 years ago
Blocks: 586261
(Reporter)

Updated

7 years ago
Flags: flashplayer-injection-

Updated

7 years ago
Attachment #511365 - Flags: review?(dschaffe) → review+

Comment 2

7 years ago
changeset: 5914:234b417f2cc6
user:      Brent Baker <brbaker@adobe.com>
summary:   Bug 633171: do not compile the memory-profiler in code coverage since it does not compile on linux (r=dschaffe)

http://hg.mozilla.org/tamarin-redux/rev/234b417f2cc6
(Reporter)

Comment 3

7 years ago
(In reply to comment #2)
> changeset: 5914:234b417f2cc6
> user:      Brent Baker <brbaker@adobe.com>
> summary:   Bug 633171: do not compile the memory-profiler in code coverage
> since it does not compile on linux (r=dschaffe)
> 
> http://hg.mozilla.org/tamarin-redux/rev/234b417f2cc6

Need to re-enable the memory-profile code coverage testing once this issue is
resolved.

Comment 4

7 years ago
Once SpyUtilsPosix.cpp is included in the Linux case in VMPI/manifest.mk it comes down to two problems in MMgcPortUnix.cpp:

- The 32-bit version of VMPI_captureStackTrace does not compile (sintptr is
  obsolete)
- No 64-bit version of VMPI_captureStackTrace is defined.
Priority: -- → P3
Summary: Memory profiler fails to compile on linux → VMPI_captureStackTrace does not compile for either 32-bit or 64-bit x86 Linux
Target Milestone: --- → Q3 11 - Serrano

Updated

7 years ago
Assignee: nobody → treilly

Comment 5

7 years ago
According to Dan 32-bit is really the more important part here.  (API ought to work, besides compiling cleanly.)
(Assignee)

Comment 6

7 years ago
Created attachment 526298 [details] [diff] [review]
fixes for linux 32, haven't tried 64 bit yet
Attachment #526298 - Flags: review?(lhansen)

Updated

7 years ago
Flags: flashplayer-qrb? → flashplayer-qrb+

Comment 7

7 years ago
Comment on attachment 526298 [details] [diff] [review]
fixes for linux 32, haven't tried 64 bit yet

Functionally this seems fine, but the following needs to be cleaned up before landing:

- The appropriate #ifdef to use for backtrace_symbols is "linux", not "__GNUC__",
  cf other code in the file

- The #include of execinfo.h should be moved to the file header, with all the
  other includes.
Attachment #526298 - Flags: review?(lhansen) → review+
(Assignee)

Updated

7 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 8

7 years ago
http://hg.mozilla.org/tamarin-redux/rev/cd12c2c84566
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.