Skip to content
  • Nikolai Kosjar's avatar
    AutoTest: Fix heap-use-after-free · 156ece7b
    Nikolai Kosjar authored
    
    
    The snapshot was given as a temporary expression to
    findMatchingDefinition(). Upon destruction it deleted documents/controls
    to which the returned symbols still had pointers to. The prime candidate
    for the document to free is the one coming from the editor - the user
    typed new content and thus created a new document. The last reference to
    the old document was held in the temporary argument expression.
    
    Fix by pinning the snapshot.
    
    Task-number: QTCREATORBUG-16062
    Change-Id: I4fb3915bef8471cefef4ca27450901824416e397
    Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
    156ece7b