Closed Bug 615534 Opened 14 years ago Closed 14 years ago

warning: operation ++ on 'i' may be undefined as i is used again in an argument to CopyIndexAfterObject in MinidumpGenerator::WriteMemoryListStream

Categories

(Toolkit :: Crash Reporting, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

Details

Attachments

(1 file)

toolkit/crashreporter/google-breakpad/src/client/mac/handler/minidump_generator.cc: 645: warning: operation on ‘i’ may be undefined the line is: list.CopyIndexAfterObject(i++, &memory_blocks_[i], the problem is mixing i++ and [i] as arguments to a function call, the i++ can happen before or after [i] is evaluated
Blocks: 536271
Attached patch patchSplinter Review
i have r=ted from irc. and this should just land. it's actually rather bad since the for loop is incrementing too.
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #493978 - Flags: review+
Attachment #493978 - Flags: approval2.0?
Keywords: checkin-needed
Attachment #493978 - Flags: approval2.0? → approval2.0+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
I wrote a unit test and pushed this upstream: http://code.google.com/p/google-breakpad/source/detail?r=735 The existing unit tests didn't catch this because the code happened to work correctly if there was only one thread running. :-/
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: