Closed
Bug 108137
Opened 24 years ago
Closed 17 years ago
enable build for SmartHeap
Categories
(SeaMonkey :: Build Config, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: waterson, Unassigned)
Details
(Keywords: perf)
Attachments
(4 files)
|
9.76 KB,
patch
|
Details | Diff | Splinter Review | |
|
9.47 KB,
patch
|
Details | Diff | Splinter Review | |
|
9.75 KB,
text/plain
|
Details | |
|
10.48 KB,
application/octet-stream
|
Details |
Allow mozilla to be built with the SmartHeap library.
| Reporter | ||
Comment 1•24 years ago
|
||
| Reporter | ||
Comment 2•24 years ago
|
||
Attachment 56222 [details] [diff] appears to create DLLs that have no reference to MSVC's malloc
(); however, the build doesn't run and gets heap corruption errors on startup.
Priority: -- → P1
Target Milestone: --- → mozilla0.9.6
| Reporter | ||
Comment 3•24 years ago
|
||
| Reporter | ||
Comment 4•24 years ago
|
||
The above patch produces a working, but very unstable build. There are still
several libraries that appear to be pulling in malloc et al. from MSVC,
including:
nspr4(_strdup)
plds4(malloc, free)
mozreg(malloc, free)
smimestb(malloc, free)
ISimpleDOMNodeMarshal(malloc, free)
ISimpleDOMDocumentMarshal(malloc, free)
nssckbi(malloc, free)
MapiProxy(malloc, free)
mozMapi32(malloc, free)
oji(_strdup)
xpacct32(_strdup)
appcomps(_strdup)
xpinstall(_strdup)
xpcom(_strdup)
js3250(_strdup)
I'm not sure why we're pulling in malloc and free; I suspect we're getting
_strdup due to some MS header file funkiness. I'll dig more tomorrow.
| Reporter | ||
Comment 5•24 years ago
|
||
Well, it turns out that shlw32m.lib _doesn't have_ strdup(). That's going to be
a problem.
| Reporter | ||
Comment 6•24 years ago
|
||
| Reporter | ||
Comment 7•24 years ago
|
||
Hey jband, rpotts - I'm trying to wedge SmartHeap into the build (again!), and
am running into a few problems.
First, the library that I've got doesn't have strdup (I'm currently using a
bootleg copy while I wait for AOL's fine procurement machinery to lumber into
gear). I suspect this causes heap corruption when we use SmartHeap's free on
memory allocated with MSVCRT's strdup.
That aside, I'm still getting some bizarre stuff where the linker seems to
insist upon putting references to MSVCRT's malloc and free: see the above
|link -verbose| output (attachment 56311 [details]) from an attempt to link plds4.dll
using the following command:
link -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE -OUT:"plds4.dll"
-DEBUG -DEBUGTYPE:CV -MAP /BASE:0x30000000
shlw32m.lib
c:/waterson/NETSCAPE_6_2_RELEASE/mozilla/dist/WIN32_O.OBJ/lib/nspr4.lib
user32.lib ./plarena.obj ./plhash.obj ./plvrsion.obj ./plds.res
Surprisingly, a nearly identical command to link plc4.dll results in no
references to the malloc in MSVCRT.DLL:
link -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE -OUT:"plc4.dll" -DEBUG
-DEBUGTYPE:CV -MAP /BASE:0x30000000
shlw32m.lib
c:/waterson/NETSCAPE_6_2_RELEASE/mozilla/dist/WIN32_O.OBJ/lib/nspr4.lib
./plvrsion.obj ./strlen.obj ./strcpy.obj ./strdup.obj ./strcat.obj
./strcmp.obj ./strccmp.obj ./strchr.obj ./strpbrk.obj ./strstr.obj
./strcstr.obj ./base64.obj ./plerror.obj ./plgetopt.obj ./plc.res
I've tried re-linking plds4.dll by hand, removing user.lib, but to no avail.
| Reporter | ||
Comment 8•24 years ago
|
||
cathleen wants to fix this.
Assignee: waterson → cathleen
Status: ASSIGNED → NEW
Comment 9•24 years ago
|
||
Is this really supposed to be so easy? Waterson, do you know what happened to
that dll entrypoint hooker code I passed off to mjudge? We were going to use
this for tracemalloc support on Win32. That stuff had support for hooking all
the allocation entry points (that we knew of at the time). Some of them are
mangled in interesting ways.
Comment 10•24 years ago
|
||
| Reporter | ||
Comment 11•24 years ago
|
||
(*shrug*) We're flying a bit blind right now (somebody mailed us a single static
library, our copy of SmartHeap is in that wonderful procurement black hole
called ``on order''). The static lib does appear to provide operator new,
operator delete, the array versions of these, malloc, free, calloc, and realloc,
and AFAICT, _most_ of the time they're being used.
I'll mail you the SH library if you want to take a crack at this.
Comment 12•24 years ago
|
||
hey chris,
why does the linker think that 'MSVCRT' is a default lib? have you tried adding
/NODEFAULTLIB:MSVCRT and then explicitly adding it *after* the smartheap lib (if
necessary)...
-- rick
Comment 13•24 years ago
|
||
Looks like this won't make it in for 0.9.6.
Comment 14•24 years ago
|
||
This didn't make it in for 0.9.8, will it be 0.9.9 ?
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → ---
Updated•21 years ago
|
Product: Browser → Seamonkey
Updated•17 years ago
|
Assignee: cathleennscp → nobody
Priority: P1 → --
QA Contact: granrosebugs → build-config
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•