Open Bug 1470911 Opened 6 years ago Updated 1 year ago

Remove use of va_list from all error-reporting APIs

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox62 --- affected

People

(Reporter: Waldo, Unassigned)

References

(Blocks 1 open bug)

Details

All the error reporting goo takes parameter lists passed using C varargs.  This makes for a nice hole in the type system that can't even be checked at runtime.  We should be able to replace this with safe variadic templates (particularly in the short term, for APIs that feed into the error reporting subsystem, so we don't have to rewrite them all at once) and some sort of pointer+length helper class with runtime-assertable bounds.

Unfortunately, because the lowest levels traffick in va_list, even *as* the upper levels are rewritten, they still have to be able to pass va_list to the lower levels.  I do think it's possible to do some of this work incrementally, but I'm not sure how precisely you slice it to do so.
Priority: -- → P3
See Also: → 1502792
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.