Repository navigation
Crossgen2-related CoreCLR test infra fixes - #49867
Conversation
(*) When compiling tests with Crossgen2, use optimizations by default like Crossgen1 does. (*) Don't use large version bubble when Crossgen2-compiling the framework. While at some point this had value as preparatory testing for composite mode, it's not a shipping scenario right now and it was hiding the codegen bug causing the issue dotnet#49826 in System.Text.Json. Thanks Tomas
davidwrighton
left a comment
There was a problem hiding this comment.
I'd like to see us respect the debuggable attribute of the assembly instead of using the -O parameter, but this is good for now.
|
If optimizations would have been enabled would it have caught the json issue? |
|
The optimizations are mostly a matter of better matching "end customer" scenario (the SDK also uses -O when invoking Crossgen2). This bug requires optimizations to be turned on in framework compilation and that happens in both CoreCLR testing and in installer build. The problematic bit that was hiding the bug was the "--large-bubble" specifier (specific to CoreCLR testing, the installer build doesn't have that problem, that's why I was able to repro the bug with a downloaded runtime but not with my locally built CORE_ROOT); that made us compile the entire framework as one version bubble (albeit file by file) and that enabled more aggressive inlining that removed the problematic calls emitting the invalid signatures. |
(*) When compiling tests with Crossgen2, use optimizations by default
like Crossgen1 does.
(*) Don't use large version bubble when Crossgen2-compiling
the framework. While at some point this had value as preparatory
testing for composite mode, it's not a shipping scenario right now
and it was hiding the codegen bug causing the issue
#49826
in System.Text.Json.
Thanks
Tomas
/cc @dotnet/crossgen-contrib