Closed theoractice closed 4 years ago
Maybe a regression in the latest ILDasm? https://developercommunity.visualstudio.com/content/problem/545431/ildasmexe-regression-with-infinum-floating-point-v.html
Please clarify the following:
What DllExport version? What ILAsm/ILDasm? What project type?
Did you try our custom ilasm/ildasm versions?
And can you try with my latest 4.700.2 version: https://github.com/3F/coreclr
Ah, never know there is a version for .net core, that's very helpful, thanks. However I'm using v1.6.5 with a .net framework dll project so this issue is not .net core related. I tried every option that I could find including the "Use our IL Assembler" one, and none of them worked.
I confirm the mismatch between versions.
ILDasm 4.8.3928.0 marks this as inf
/-inf
While the most modern ILAsm (4.8.3761.0 on my laptop) can only process it as 0x7F800000
/0xFF800000
values (for single precision of course).
So, Actually you need address it to Microsoft. Because we already provide our own modified versions. Please use this instead.
I tried every option that I could find including the "Use our IL Assembler" one, and none of them worked.
Please attach log with diagnostic key:
msbuild /v:diag
Or please minimal reproducible project sample. Because I don't see problems when our assembler.
Ah, never know there is a version for .net core, that's very helpful, thanks.
Yes, planned 1.7 provides both support for netfx and netcore.
Beta2 release is just out: https://twitter.com/GitHub3F/status/1205616579607715840
1.7 Beta3 release provides now Single + Double Inf/-Inf token patching
option.
Check this out.
1.7 beta3 with the "Use our IL Assembler" option works, thanks.
Or please minimal reproducible project sample. Because I don't see problems when our assembler.
Version 1.6.5 with the "Use our IL Assembler" option yields this error:
error : Failed to define security permission set for 0x20000001
Sorry I forgot to mention this type of error in previous comments, but that's how it fails. Just post here FYI.
1.7 Beta3 release provides now Single + Double Inf/-Inf token patching option.
I cannot find that option in the config window. In fact it looks like this:
And if I uncheck the "Use our IL Assembler" option, then the inf error reappears.
Are there any options hidden because of the window size? I cannot resize it.
1.7 beta3 with the "Use our IL Assembler" option works, thanks.
Good! FYI, This patch can be also applied for original MS assembler on netfx.
error : Failed to define security permission set for 0x20000001
This is known error: https://github.com/3F/DllExport/issues/19#issuecomment-269245014
I cannot find that option in the config window.
Yes, more like the problem with layout, again on Chinese system: https://github.com/3F/DllExport/issues/61
You can temporarily configure it manually, please update value for DllExportPatches
in your settings (project files or external target depends on your choice):
You need set the first bit for mask:
/// <summary>
/// Affects ldc.r8; ldc.r4; .field;
///
/// inf/-inf to 0x7F800000/0xFF800000
/// 0x7FF0000000000000/0xFFF0000000000000
///
/// https://github.com/3F/DllExport/issues/128
/// </summary>
InfToken = 0x01,
eg.:
<DllExportPatches>here</DllExportPatches>
I cannot resize it.
It shouldn't be resized. Please continue here: https://github.com/3F/DllExport/issues/61#issuecomment-566519504
All problems solved, thank you very much.
I run into the exact same issue on VS 2022 and can confirm that the Single + Double Inf/-Inf token patching
option solves it.
This is with the latest VS2019 version 16.4. Build log:
Maybe this is what happened:
syntax error at token 'inf' in: .field public static literal float32 'Infinity' = float32(inf)
.The problematic il snippet:
Any ideas?