Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 418
    • Issues 418
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !287

Fix warning phm

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Thomas Koopman requested to merge thomas/sac2c:array-bounds-warning into develop Mar 05, 2024
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

gcc 13.2.0 gives warnings like

/home/thomas/repos/sac2c/src/libsacphm/compat/malloc.c: In function ‘memalign’:
/home/thomas/repos/sac2c/build_CFAL/include/runtime/phm_h/phm.h:125:56: warning: array subscript -1 is outside array bounds of ‘void[]’ [-Warray-bounds]
  125 | #define SAC_HM_LARGECHUNK_ARENA(header) (((header) + 1)->data1.arena)

This is not an error as there is bookkeeping information in front of the chunks, but gcc does not know that the memory was allocated by the phm version of malloc instead of the system malloc.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: array-bounds-warning