Bug 24720 - Crash when freeing COM callable wrappers
Summary: Crash when freeing COM callable wrappers
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Interop (show other bugs)
Version: 3.4.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-21 04:15 UTC by daspits
Modified: 2015-01-08 05:05 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description daspits 2014-11-21 04:15:44 UTC
Occasionally, a crash occurs when attempting to free a CCW. The crash occurs in the "mono_marshal_free_ccw" function. It seems to be caused by an invalid pointer to the CCW list for an object returned from the ccw_hash hashtable. The CCW list pointer becomes invalid when the first item in a CCW list is removed. The hashtable holds the pointer to the first item in the list, so the pointer it holds becomes invalid in that case. The fix would be to re-add the CCW list to the hashtable when the first item in the list is removed.
Comment 1 Zoltan Varga 2015-01-08 05:05:31 UTC
Applied a fix to mono master a568b19c13fc2ea713f8ac2d9f2126214cae4ff7.