Closed Bug 633171 Opened 13 years ago Closed 13 years ago

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

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
Q3 11 - Serrano

People

(Reporter: brbaker, Assigned: treilly)

References

Details

Attachments

(2 files)

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+
Need to remove the building and testing of the memory profiler from code coverage until this issue is resolved.
Attachment #511365 - Flags: review?(dschaffe)
Flags: flashplayer-injection-
Attachment #511365 - Flags: review?(dschaffe) → review+
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
(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.
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
Assignee: nobody → treilly
According to Dan 32-bit is really the more important part here.  (API ought to work, besides compiling cleanly.)
Attachment #526298 - Flags: review?(lhansen)
Flags: flashplayer-qrb? → flashplayer-qrb+
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+
Status: NEW → ASSIGNED
http://hg.mozilla.org/tamarin-redux/rev/cd12c2c84566
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: