-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
Description
Description
I am deploying native library to arm64 (in that case linux-bionic-arm64) but I suspect this is not this target specific.
Whenever I use https://www.nuget.org/packages/BouncyCastle.Cryptography library it crash during new SecureRandom()
I copy pased this classes into my project manually and I found it crash whenever Span<byte>
is created with stackalloc
byte array and then manipulated later on.
Is stackalloc available within nativeaot compilation?
It seems to does not work with spans.
Btw:
- I preserve all assemblies with IlLink.Descriptors so I dont think that is trimmer issue
Reproduction Steps
- Reference BouncyCastle.Cryptography
- Call
new SecureRandom()
- build with nativeaot compilation
- sigarbt -1
Expected behavior
App should not crash
Actual behavior
SIGABRT -1 native crash
Regression?
No response
Known Workarounds
Dont use stackallocs with spans but… seems thats the bug
Configuration
.net 9.0.301
Other information
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status