Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #22521
Closed (moved) (moved)
Open
Issue created Jun 07, 2017 by Taylor Yu@catalyst

use offsetof() instead of rolling our own

src/common/util.h defines a STRUCT_OFFSET() macro that effectively duplicates offsetof(), which has been available in stddef.h since C89. The non-GCC version of STRUCT_OFFSET() does pointer arithmetic on null pointers, which is undefined behavior.

We should use the standard offsetof() macro instead, unless there's some reason we still need to support platforms that lack it.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking