Closed Bug 1412648 Opened 7 years ago Closed 7 years ago

[Static Analysis] Uninitialized fields in some classes of tools/profiler

Categories

(Core :: Gecko Profiler, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox-esr52 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: tristanbourvon, Assigned: tristanbourvon)

References

Details

(Whiteboard: [adv-main58+])

Attachments

(1 file)

As part of the static analysis effort to ensure all class fields are initialized before usage (see https://bugzilla.mozilla.org/show_bug.cgi?id=525063), here are a few fixes to the tools/profiler module.
Attachment #8923166 - Flags: review?(mstange)
Blocks: 1411595
Assignee: nobody → tristanbourvon
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8923166 [details] [diff] [review]
tools_profiler.patch

Review of attachment 8923166 [details] [diff] [review]:
-----------------------------------------------------------------

::: tools/profiler/core/ProfilerMarker.h
@@ +27,5 @@
>                            double aTime = 0)
>      : mMarkerName(strdup(aMarkerName))
>      , mPayload(Move(aPayload))
> +    , mNext{nullptr}, mTime(aTime)
> + , mGenID{0} {}

separate lines + bad indent

::: tools/profiler/core/platform.cpp
@@ +2498,3 @@
>  }
>  AutoSetProfilerEnvVarsForChildProcess::AutoSetProfilerEnvVarsForChildProcess(
> +  MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) : mSetEntries(), mSetInterval(), mSetFeaturesBitfield(), mSetFilters()

These need to go on separate lines. Please follow the example at https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes .
Attachment #8923166 - Flags: review?(mstange) → review+
https://hg.mozilla.org/mozilla-central/rev/41566b43f974
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Group: core-security → core-security-release
Whiteboard: [adv-main58+]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: