vsprintf analogues should use MOZ_FORMAT_PRINTF

RESOLVED FIXED in Firefox 55

Status

()

defect
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: tromey, Assigned: tromey)

Tracking

unspecified
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
Bug 1060419 adds MOZ_FORMAT_PRINTF in many places.
However, it did not touch vsprintf-like functions.
These can be marked with MOZ_FORMAT_PRINTF(N, 0); in this case
the compiler will do some minimal checking of the format string.
Assignee

Comment 1

2 years ago
Any eventual patch here should also update Attributes.h to mention the meaning of the "0".
Assignee

Updated

2 years ago
Assignee: nobody → ttromey
Comment hidden (mozreview-request)

Comment 4

2 years ago
mozreview-review
Comment on attachment 8864613 [details]
Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF;

https://reviewboard.mozilla.org/r/136290/#review139370

I guess "consistency" is "didn't use really weird format sequences"?  The docs are pretty vague.
Attachment #8864613 - Flags: review?(nfroyd) → review+

Comment 5

2 years ago
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 3afc06d748e3 -d 95211a496191: rebasing 394064:3afc06d748e3 "Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj" (tip)
merging js/src/jit/MIRGenerator.h
merging js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h
merging xpcom/string/nsTSubstring.h
warning: conflicts while merging js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment hidden (mozreview-request)
Assignee

Comment 7

2 years ago
Rebased.
Comment hidden (mozreview-request)

Comment 9

2 years ago
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ce8c07e3e29
mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj

Comment 10

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8ce8c07e3e29
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.