5 ms·
Sorry, isn't that undefined behaviour?
by Filligree 4y ago
Sorry, isn't that undefined behaviour?
- lostmsu 4y agoNot in C# for sure. Not a C++ expert, but I believe reinterpret_cast behavior is defined too.
- pjmlp 4y agoYou can have it as part of unsafe code, hence why the bytecode verifier won't validate Assemblies with unsafe code. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/unsafe-code https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...
- lostmsu 4y agoI believe verifier is fine with unsafe code. Also not sure what does it have to do with defined/undefined behavior. Even if it is not verifiable, the behavior is still defined.