Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plug leak of ppdb_filename #14541

Merged
merged 1 commit into from
Jun 12, 2019
Merged

Plug leak of ppdb_filename #14541

merged 1 commit into from
Jun 12, 2019

Conversation

Therzok
Copy link
Contributor

@Therzok Therzok commented May 20, 2019

mono_image_open_metadata_only and its callees all dupe the filename string, so free the string after mono_image_open_metadata_only is done with it:

      1 (128 bytes) ROOT LEAK: 0x7fb07f086c80 [128]  length: 105  "/Users/therzok/Work/md/md-addins/external-addins/MonoDevelop.MonoDroid/build/Xamarin.Installer.Common.pdb"

mono_image_open_metadata_only and its callees all dupe the filename string, so free the string after mono_image_open_metadata_only is done with it:

```
      1 (128 bytes) ROOT LEAK: 0x7fb07f086c80 [128]  length: 105  "/Users/therzok/Work/md/md-addins/external-addins/MonoDevelop.MonoDroid/build/Xamarin.Installer.Common.pdb"
```
@@ -154,8 +154,7 @@ mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size)
}

ppdb_image = mono_image_open_metadata_only (ppdb_filename, &status);
if (!ppdb_image)
g_free (ppdb_filename);
g_free (ppdb_filename);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to move the definition of ppdb_filename into that else clause?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to avoid cosmetic changes :D

@lambdageek
Copy link
Member

Several lanes all failing in

HttpWebRequestTest.Sync
WebClientTest.DownloadTwice
Error Message
System.Net.WebException : The remote server returned an error: (429) Too Many Requests.
Stacktrace
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x00146] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/System.Net/HttpWebRequest.cs:1101 
  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000e8] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/System.Net/HttpWebRequest.cs:956 
  at System.Net.HttpWebRequest.GetResponse () [0x0000f] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/System.Net/HttpWebRequest.cs:1218 
  at System.Net.WebClient.GetWebResponse (System.Net.WebRequest request) [0x00000] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:249 
  at System.Net.WebClient.DownloadBits (System.Net.WebRequest request, System.IO.Stream writeStream) [0x000e6] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:850 
  at System.Net.WebClient.DownloadFile (System.Uri address, System.String fileName) [0x00088] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:329 
  at System.Net.WebClient.DownloadFile (System.String address, System.String fileName) [0x00000] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:308 
  at (wrapper remoting-invoke-with-check) System.Net.WebClient.DownloadFile(string,string)
  at MonoTests.System.Net.WebClientTest.DownloadTwice () [0x0000b] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/Test/System.Net/WebClientTest.cs:38 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395 

@lambdageek
Copy link
Member

@monojenkins build failed

@Therzok
Copy link
Contributor Author

Therzok commented May 31, 2019

Anything else needed?

@marek-safar marek-safar merged commit 6696293 into mono:master Jun 12, 2019
@Therzok Therzok deleted the patch-3 branch June 12, 2019 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants