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
  • OpenGL
  • common
  • Image.hpp
Find file
BlameHistoryPermalink
  • Peter Collingbourne's avatar
    Don't unlock Android buffers immediately after locking them. · e41e86d0
    Peter Collingbourne authored Apr 21, 2020
    In some Android gralloc implementations (e.g. minigbm), the lock operation
    corresponds to mmap, and unlock corresponds to munmap. This means that
    this code was previously returning an unusable buffer in the case where
    lockInternal is called passing LOCK_UNLOCKED (e.g. the mipmap buffer
    initializer in Sampler.cpp), resulting in segfaults later on.
    
    To prevent this from happening, don't unlock the native buffer and just leak
    the reference.
    
    Bug: b/142352330
    Change-Id: I553801f32978c1d0af4597baad374381585e78ad
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44168Reviewed-by: 's avatarLingfeng Yang <lfy@google.com>
    Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
    Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Presubmit-Ready: Peter Collingbourne <pcc@google.com>
    Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    e41e86d0
Image.hpp 10.3 KB
EditWeb IDE
×

Replace Image.hpp

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.