Closed Bug 331744 Opened 18 years ago Closed 17 years ago

trace-malloc does not work on x86_64 linux

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

trace-malloc doesn't work for me on x86_64 Linux (Fedora Core 5), because the way we define a malloc whose goal is to override the malloc in glibc doesn't actually seem to override the one in glibc.  I asked Ulrich Drepper about this, and he said (as I expected) that the functions in glibc are designed so that you can do this, and didn't know why it wouldn't be working.

(Working on x86_64 also depends on being 64-bit clean, bug 331743.)
Turns out 4 changes of the form:

-__ptr_t malloc(size_t size)
+NS_EXTERNAL_VIS_(__ptr_t)
+malloc(size_t size)

get the callbacks called.  Not sure why this is different between i386 and x86_64, though.
This might actually not be x86_64 specific.  I may have just had different visibility options in the two builds.
I've put the patch for this within my patch on bug 331743.
We need a better stackwalk.
Depends on: 326594
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Component: XP Miscellany → General
QA Contact: brendan → general
Component: General → XPCOM
QA Contact: general → xpcom
You need to log in before you can comment on or make changes to this bug.