Bug 1587162 - Fix UBSAN complaints about pref callbacks. r=erahm
ClosedPublic

Authored by njn on Oct 29 2019, 5:59 AM.

Details

Summary

Lots of these callbacks have a non-void* final parameter, which UBSAN
complains about. This commit changes them to have a void* parameter.

This requires undoing the machinery added in the first two commits of bug 1473631: TypePrefChangeFunc and PREF_CHANGE_METHOD. The resulting code is
simpler (which is good) and more boilerplate-y (which is bad) but avoids the
undefined behaviour (which is good).

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
This revision is now accepted and ready to land.Oct 31 2019, 11:25 PM
njn retitled this revision from Bug 1587176 - Fix UBSAN complaints about pref callbacks. r=erahm to Bug 1587162 - Fix UBSAN complaints about pref callbacks. r=erahm.Nov 1 2019, 2:57 AM
njn changed the Bugzilla Bug ID from 1587176 to 1587162.