Open Bug 407445 Opened 12 years ago Updated 11 years ago treats "--object" address case-sensitively


(Testing :: General, defect, minor)

Not set


(Not tracked)



(Reporter: jruderman, Assigned: sgautherie)



(1 file, 1 obsolete file)

I ran into this when trying to debug bug 407277.  The output from trace-refcnt included the address of the leaked object in lowercase:

1476 @0x3f13ef90 (1 references; 0 from COMPtrs)

but gave me nothing for "--object 0x3f13ef90".  It worked fine when I retried with "--object 0x3F13EF90".  I only figured that out because outputs the address in uppercase.

IMO, should work given an address in either case.
This just requires changing this line:
          next LINE unless ($obj eq $::opt_object);
to do a case-insensitive comparison.  (Probably either call lc on both arguments -- maybe on $::opt_object once outside the loop -- or use the i parameter to a regexp match.)
I don't know perl, so can you do it? :)
QA Contact: general → xpcom
Attached patch (Av1) <> (obsolete) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008080121 Minefield/3.1a2pre] (home, debug default) (W2Ksp4)

Uppercase the parameter value.

*Move a line to optimize a loop a little.
*Add/remove a few blank lines.
Assignee: nobody →
Attachment #332291 - Flags: review?
Attachment #332291 - Flags: review? → review?(dbaron)
Severity: normal → minor
Component: XPCOM → Testing
OS: Mac OS X → All
QA Contact: xpcom → testing
Hardware: PC → All
Target Milestone: --- → mozilla1.9.1a2
Comment on attachment 332291 [details] [diff] [review]
(Av1) <>

1) don't reformat all the code

2) don't assume that the stuff in the log is one case or the other.  It may vary between platforms.  (However, find-leakers and make-tree are consistent.)
Attachment #332291 - Flags: review?(dbaron) → review-
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008080121 Minefield/3.1a2pre] (home, debug default) (W2Ksp4)

Av1, with comment 4 suggestion(s),

*Merge |$callGraphRoot| declar + init lines.
*Add a few comments.
*Remove unused |my ...|s.
*Remove unreachable code.
*Add forward declarations, to silence warnings.
 *And add a "missing" parameter value.
*Indent one line.
Attachment #332308 - Flags: review?(dbaron)
Attachment #332291 - Attachment is obsolete: true
Comment on attachment 332308 [details] [diff] [review]
(Av2) <>

Don't reformat all the code and make lots of arbitrary changes, especially given that this has no test suite.
Attachment #332308 - Flags: review?(dbaron) → review-
There's probably not a good component for bugs like these.
Component: Testing → General
Product: Core → Testing
QA Contact: testing → general
Target Milestone: mozilla1.9.1a2 → ---
You need to log in before you can comment on or make changes to this bug.