Skip to content

Fix false-positive CFI failure

Thomas Anderson requested to merge thomasanderson/fontconfig:fix-cfi into main

When building Chromium with upstream Fontconfig with CFI, the following build error is raised:

../../third_party/fontconfig/src/src/fchash.c:105:21: runtime error: control flow integrity check for type 'unsigned int (const void *)' failed during indirect function call

This occurs because CFI doesn't like the conversion from unsigned int (const char *) to unsigned int (const void *). To fix this, simply redefine FcHashFunc to use char * instead.

Merge request reports