Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
G
glslang
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • glslang
  • Repository

Switch branch/tag
  • glslang
  • SPIRV
  • SPVRemapper.cpp
Find file
BlameHistoryPermalink
  • craig stout's avatar
    [spirv-remap] Fix undefined behavior in hashing (#2403) · d0e7ed37
    craig stout authored Sep 26, 2020
    There's a statement that intends to generate a 32-bit hashcode, but due
    to integer promotion, the intermediate values can trigger signed integer
    overflow, which is undefined behavior.
    
    To avoid this, cast at least one operand to unsigned int before
    multiplying, which will cause the result to be promoted to unsigned int
    instead of signed int.
    
    With this patch, I'm able to build core for qemu-x64 with host_asan-ubsan.
    
    Fixed: 60128
    Change-Id: Idd644e534116bf29dca8013936ac39901bbe68fc
    Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/glslang/+/428254Reviewed-by: 's avatarJohn Bauman <jbauman@google.com>
    Co-authored-by: 's avatarDrew Fisher <zarvox@google.com>
    d0e7ed37
SPVRemapper.cpp 52 KB
EditWeb IDE
×

Replace SPVRemapper.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.