Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] export $DOTNET_gcServer as 0 (#7363)
Context: https://github.com/dotnet/linker/issues/3012 Context: https://github.com/dotnet/linker/issues/3012#issuecomment-1239958027 Occasionally, `AotTests.BuildAMassiveApp()` will fail, because the linker crashed: Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Mono.Cecil.MetadataReader.RangesSize(Mono.Cecil.Range[]) at Mono.Cecil.MetadataReader.ReadCustomAttributes(Mono.Cecil.ICustomAttributeProvider) at Mono.Cecil.Mixin+<>c.<GetCustomAttributes>b__13_0(Mono.Cecil.ICustomAttributeProvider, Mono.Cecil.MetadataReader) at Mono.Cecil.ModuleDefinition.Read[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.__Canon, System.Func`3<System.__Canon,Mono.Cecil.MetadataReader,System.__Canon>) at Mono.Cecil.Mixin.GetCustomAttributes(Mono.Cecil.ICustomAttributeProvider, Mono.Collections.Generic.Collection`1<Mono.Cecil.CustomAttribute> ByRef, Mono.Cecil.ModuleDefinition) at Mono.Cecil.MethodDefinition.get_CustomAttributes() at Microsoft.Android.Sdk.ILLink.ApplyPreserveAttribute.GetPreserveAttributes(Mono.Cecil.ICustomAttributeProvider) … The ILLink utility is run in a separate process, and is configured to use the Server GC by default. We believe that the `AccessViolationException` is a bug in the Server GC, and the [suggested workaround][0] was to disable the server GC. Export `DOTNET_gcServer=0` so that the Server GC is disabled, in an effort to prevent the `AccessViolationException`. [0]: https://github.com/dotnet/linker/issues/3012#issuecomment-1237823998
- Loading branch information