Skip to content
Snippets Groups Projects
  1. Mar 24, 2016
  2. Mar 23, 2016
    • Brad King's avatar
    • Yves Frederix's avatar
      Avoid occasional use-after-free when a variable watch is executed · c6104028
      Yves Frederix authored and Brad King's avatar Brad King committed
      Re-lookup a variable value when an associated VariableWatch is executed
      in cmMakefile::GetDefinition.
      
      This fixes a problem with 'def' sometimes becoming invalid due to memory
      reallocation inside an std::vector. In this case, the problem was that
      if the call to VariableAccessed actually executed a callback function,
      the internal state of the makefile has changed due to the associated
      function scope being pushed. This in turn implies that a new
      cmDefinitions instance was pushed in cmMakefile::VarTree. As
      cmLinkedTree is based on an std::vector, this push can have triggered
      reallocation of its internal memory buffer. However, as the value of
      'def', which was computed on method entry, actually points to a property
      of one of the cmDefinitions instances in cmMakefile::VarTree,
      reallocation can invalidate the value of 'def' so that it cannot simply
      be returned at the end of the function. The solution implemented here is
      to simply lookup the value of 'def' again.
      c6104028
  3. Mar 22, 2016
  4. Mar 21, 2016
  5. Mar 18, 2016
  6. Mar 17, 2016
  7. Mar 15, 2016
  8. Mar 08, 2016
  9. Mar 07, 2016
  10. Feb 24, 2016
  11. Feb 19, 2016
  12. Feb 18, 2016
  13. Feb 17, 2016
  14. Feb 12, 2016
  15. Feb 11, 2016
Loading