runtime: Corefx package update in corefxlab results in free before malloc error during restore on OSX

From https://github.com/dotnet/corefxlab/pull/2140 Update Cli, CoreFx, CoreSetup to preview2-008266, preview2-26228-03, preview2-26227-03, respectively

https://ci.dot.net/job/dotnet_corefxlab/job/master/job/osx10.12_debug_prtest/1613/consoleFull#7440085258bb52e59-de52-4f1c-b131-470db4c594cd

22:09:53 Restoring all packages
22:09:53 Error:
22:09:53   An assembly specified in the application dependencies manifest (dotnet.deps.json) was not found:
22:09:53     package: 'Microsoft.ApplicationInsights', version: '2.0.0'
22:09:53     path: 'lib/dotnet5.4/Microsoft.ApplicationInsights.dll'
22:09:53 dotnet(51167,0x7fffcf7163c0) malloc: *** error for object 0xffffffffffffffff: pointer being freed was not allocated
22:09:53 *** set a breakpoint in malloc_error_break to debug
22:09:53 ./build.sh: line 84: 51167 Abort trap: 6           ./$dotnetExePath restore $myFile /p:VersionSuffix="$BuildVersion"
22:09:53 
Failed to restore packages.

cc @danmosemsft, @livarcocc, @joshfree

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

I think the best way to deal with the C/C++ name collisions is to limit what your module depends on using linker scripts. We do that in CoreCLR: https://github.com/dotnet/coreclr/blob/master/src/dlls/mscoree/coreclr/CMakeLists.txt#L25 @janvorli put this together for CoreCLR, so he can help you with any details if you need.

@steveharter we added a temporary workaround that removes latest hostfxr to dotnet-install script.