Skip to content

Statically assert some things we assume about pointers

Simon McVittie requested to merge smcv/dbus:pointer-assumptions into master
  • dbus-marshal-basic: Use _DBUS_ALIGNOF to compare alignments

    This means we get the alignment comparisons even on non-gcc compilers.

  • internals: Statically assert some things we assume about pointers

    Like many relatively-low-level codebases, dbus has historically assumed that data pointers are interchangeable with function pointers (which is implied by POSIX and also true on Windows, but not guaranteed by ISO C).

    Before !335 (merged) was merged, we also assumed that size_t is the same size as a pointer (which is frequently assumed, but not guaranteed by ISO C, and notably not true on CHERI). !335 (merged) is believed to have removed all uses of that assumption.


/cc @arichardson @thiago

Edited by Simon McVittie

Merge request reports