Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dbus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 262
    • Issues 262
    • List
    • Boards
    • Service Desk
    • Milestones
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • dbusdbus
  • dbus
  • Merge requests
  • !345

Statically assert some things we assume about pointers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon McVittie requested to merge smcv/dbus:pointer-assumptions into master Sep 15, 2022
  • Overview 16
  • Commits 2
  • Pipelines 3
  • Changes 2
  • 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 Nov 29, 2022 by Simon McVittie
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: pointer-assumptions