Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Spot Spot
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Spot
  • SpotSpot
  • Issues
  • #413

Closed
Open
Created May 22, 2020 by Antoine Martin@amartinDeveloper

Possible undefined behaviour in fixpool.hh

While hunting a (in the end, unrelated) segmentation fault, I've tried enabling clang's UBsan and Asan on Spot. UBsan detects a possible undefined behavior in the fixed memory pool, on this line:

https://gitlab.lrde.epita.fr/spot/spot/-/blob/a0767e3c1e09691340b07e67c675c16285691f26/spot/misc/fixpool.hh#L70

Adding a non zero offset to a nullptr seems to be undefined, more info here. I don't think this currently creates problems, but it seems like it could lead to UB in the future.

Note: UBsan on gcc 10.1.0 doesn't seem to detect this case, clang 10.0.0 does.

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