Closed Bug 741242 Opened 12 years ago Closed 12 years ago

Profiler address output broken by bug 739800 on Mac 64 bit

Categories

(Core :: Gecko Profiler, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: mstange, Assigned: vladan)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached patch v1Splinter Review
%#x uses an int value which truncates 64 bit addresses to 32 bit. We need to use %#lx instead.
Do things still work on Windows with this change?
Attachment #611316 - Flags: review?(vdjeric)
I think we need '(long unsigned int)pc'.
Comment on attachment 611316 [details] [diff] [review]
v1

%lx truncates the address on 64-bit windows

Let's do this:

snprintf(tagBuff, 1024, "l-0x%p\n", pc);

^^^ explicitly specifying "0x" because "%#p" outputs "OX"

Can you guys test this on 32-bit/64-bit Unix and Mac?
Attachment #611316 - Flags: review?(vdjeric) → review-
Tested, %p appends 0x so we get it twice. Let's use some ifdefs here.
Attachment #611522 - Flags: review?(bgirard)
Attachment #611522 - Flags: review?(bgirard) → review+
Assignee: nobody → vdjeric
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/d4f6c908dc17
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: