Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S ScalFMM
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 14
    • Issues 14
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • solverstack
  • ScalFMM
  • Issues
  • #22
Closed
Open
Issue created Nov 14, 2019 by Ghost User@ghost

Undefined behavior in bit shift

This was revealed by gcc's undefined behavior sanitizer. The files Src/Containers/F{,Sub}Octree.hpp (“include” instead of “Src” in recent branches) contain several instances of:

~(~0x00LL << (3 *  some_expression ))

where ~0x00LL evaluates to -1LL. Left-shifting a negative number is undefined behavior in C++.

Solution: sed -i 's/~0x00LL/~0ULL/' Src/Containers/F{,Sub}Octree.hpp

Impacted versions: every branch and tagged commit is affected.

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