Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
S
ScalFMM
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • solverstack
  • ScalFMM
  • Issues
  • #22

Closed
Open
Opened 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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: solverstack/ScalFMM#22