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
  • NameSpace.hpp
Find file
BlameHistoryPermalink
  • Lingfeng Yang's avatar
    [emulator] Delete VAOs starting from highest · 5da143cb
    Lingfeng Yang authored Dec 22, 2016
    If VAOs are deleted starting from 0, then the
    following happens when an app's context has
    genned two VAO's that are both != 0,
    and the first of the two nonzero VAOs
    is the current one:
    
    VAO 0
    VAO 1 <- current
    VAO 2
    
    in context dtor loop over vao map:
    delete vao 0 (done)
    delete vao 1:
    is current, so bind 0:
    in bind 0, we create a new map entry since 0 was deleted
    next loop iter deletes vao 0 again (done)
    *** at this point, vao 0 pointer refers to freed memory ***
    next loop iter wants to delete vao 2,
    but the current vao is 0 and refers to freed memory.
    then, in Context::deleteVertexArray:
    if (getCurrentVertexArray()->name...) <- Segmentation fault (core dumped)
    
    This CL deletes VAO 0 last.
    
    Change-Id: Ifa606ad7517cd213f21606577d3bdd8d810b640d
    Reviewed-on: https://swiftshader-review.googlesource.com/8350Reviewed-by: 's avatarNicolas Capens <capn@google.com>
    Tested-by: 's avatarLingfeng Yang <lfy@google.com>
    5da143cb
NameSpace.hpp 2.08 KB
EditWeb IDE
×

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