Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 887
    • Issues 887
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 105
    • Merge requests 105
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Merge requests
  • !904

record: Support architectures with sizeof(void*) > sizeof(long)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Alexander Richardson requested to merge arichardson/xserver:recordset-alignment into master May 22, 2022
  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 1

I was seeing SIGBUS errors when running TigerVNC inside the record code because the offsets into the memory buffer were not sufficiently aligned to use the RecordSetRec (alignof(void*)). The current code ensures that all offsets are alinged to sizeof(unsigned long), but that may not be sufficient to load/store a pointer. Architectures where this is not true include Arm Morello which has 16-byte pointers and 8-byte longs.

The current patch uses C11 _Alignof which I believe means it cannot be merged yet. However, I am posting this MR now to see which _Alignof() workaround is preferred: emulation using a struct + offsetof() or using the approximation of sizeof(void*) which happens to be the same as _Alignof(BitVectorSet)/_Alignof(IntervalListSet)/_Alignof(RecordSetRec).

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: recordset-alignment