Potential crash of Agent2 related to PDH

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 6.0.40, 7.0.17, 7.2.11, 7.4.2rc1, 8.0.0alpha1
    • Component/s: Agent2 (G)
    • None
    • Environment:
      windows
    • Sprint candidates
    • 1

      Steps to reproduce:

      There is no possibility to reproduce issue in a wild, but it can explain many "not reproducible" issues related to pdh
      The reason is in the code like: 

      elements.CounterName = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(counterName))) 

      Result:

      GC does not track memory after uintptr and as a result in some cases we can use pointer to GC freed memory 

      Expected:
      Introduce intermediate variable and make refactoring similar places

            Assignee:
            Michael Veksler
            Reporter:
            Michael Veksler
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified