Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • 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
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • src
  • Reactor
  • LLVMAsm.cpp
Find file
BlameHistoryPermalink
  • Nicolas Capens's avatar
    Limit LLVM routine stack size to 512 KiB · 25f0f858
    Nicolas Capens authored Jan 07, 2021
    Fuzzing tests generate shaders with large arrays or very high numbers of
    local variables, which can cause stack overflow. We need to limit the
    allowable stack memory usage of generated routines.
    
    Note this change does not yet gracefully deal with routines which exceed
    this limit. They will cause a null pointer dereference instead of a
    stack overflow.
    
    The 512 KiB stack size limit is chosen to prevent actual stack overflow
    for a 1 MiB stack, assuming some earlier calls might want to use the
    stack. Also, our legacy 'ASM' compiler for GLSL allocates 4096
    'registers' of 4 components for 128-bit SIMD, which already requires
    256 KiB.
    
    Bug: b/157555596
    Change-Id: I25c57420f6d2af323ce98faf515feca0aa834a4a
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51548
    Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
    Kokoro-Result: kokoro <noreply+kokoro@google.com>
    Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Commit-Queue: Nicolas Capens <nicolascapens@google.com>
    25f0f858
LLVMAsm.cpp 4.55 KB
EditWeb IDE
×

Replace LLVMAsm.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.