WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
86287
run-safari and co. should support --guard-malloc command line argument
https://bugs.webkit.org/show_bug.cgi?id=86287
Summary
run-safari and co. should support --guard-malloc command line argument
Tim Horton
Reported
2012-05-12 02:18:40 PDT
run-webkit-tests supports the argument --guard-malloc on OS X to inject libgmalloc into Safari/WebProcess. run-safari and debug-safari and friends should support this as well, for convenience. I have a patch.
Attachments
patch
(3.28 KB, patch)
2012-05-12 02:24 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch + mitzification
(4.35 KB, patch)
2012-05-12 10:46 PDT
,
Tim Horton
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2012-05-12 02:24:04 PDT
Created
attachment 141563
[details]
patch If need be (if whoever reviews this wants) we can make a gdb script that we call (-x) that turns gmalloc on only for the child process and not for gdb itself. It's kind of annoying that there doesn't seem to be a way to hand it commands right on the command line...
mitz
Comment 2
2012-05-12 09:51:48 PDT
Comment on
attachment 141563
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=141563&action=review
> Tools/Scripts/webkitdirs.pm:1387 > +sub setupGuardMallocIfNeeded
This should use the verb “set up” and therefore a capital U.
> Tools/Scripts/webkitdirs.pm:1398 > + $ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib";
This will get overwritten by $ENV{DYLD_INSERT_LIBRARIES} = $webProcessShimPath; in the shouldTargetWebProcess() branch of execMacWebKitAppForDebugging(). Please change that function so that it will work with the new option.
Tim Horton
Comment 3
2012-05-12 10:46:05 PDT
Created
attachment 141583
[details]
patch + mitzification
mitz
Comment 4
2012-05-12 10:57:18 PDT
Comment on
attachment 141583
[details]
patch + mitzification View in context:
https://bugs.webkit.org/attachment.cgi?id=141583&action=review
> Tools/Scripts/webkitdirs.pm:2514 > + --guard-malloc Enable malloc guard (Mac OS X only)
I’ve never seen this called “malloc guard”. Is this what it’s called in run-webkit-tests? The man pages seem to call it Guard Malloc.
Tim Horton
Comment 5
2012-05-12 10:57:53 PDT
(In reply to
comment #4
)
> (From update of
attachment 141583
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=141583&action=review
> > > Tools/Scripts/webkitdirs.pm:2514 > > + --guard-malloc Enable malloc guard (Mac OS X only) > > I’ve never seen this called “malloc guard”. Is this what it’s called in run-webkit-tests? The man pages seem to call it Guard Malloc.
I stole the help message from run-webkit-tests, I agree it sounds a little weird. Maybe we should change it in both places?
mitz
Comment 6
2012-05-12 11:06:47 PDT
> I stole the help message from run-webkit-tests, I agree it sounds a little weird. Maybe we should change it in both places?
Good idea.
Tim Horton
Comment 7
2012-05-12 11:08:33 PDT
Landed in
http://trac.webkit.org/changeset/116859
Thanks, Dan!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug