-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Default gcAllowVeryLargeObjects to true #8853
Conversation
@Maoni0 Could you please take a look as well? |
@mikedn There are a few failing tests - they may need updating: JIT._jit64_regress_vsw_539509_test1_test1 |
@jkotas Yep, those tests were expecting an OutOfMemoryException to be thrown. I increase the array length so they always get the expected exception due to array length being limited to 2^31. PS Great, now formatting jobs fail :) |
@dotnet-bot test Ubuntu x64 Formatting please |
FYI, the formatting job failure should be fixed. |
fine by me. |
@mikedn The tests are still failing. Do they pass for you locally? Thank you for fixing this! |
@jkotas They passed before checkin. Now that I increased my pagefile size they fail too. I didn't realize that MD arrays can actually have more than 2 billion elements, back to the drawing board. |
These 2 tests appear to rely on gcAllowVeryLargeObjects being false in that they expect an exception to be thrown when allocating a very large array. Increase the number of array elements so that an OutOfMemoryException is always thown no matter what value gcAllowVeryLargeObjects has. 81*98*58*36*74*4 is 4906065024 which is larger than 2^32, the theoretical array length limit.
Yep, MD arrays can have up to 4 billion elements, updated tests accordingly. |
* Default gcAllowVeryLargeObjects to true * Update tests for gcAllowVeryLargeObjects These 2 tests appear to rely on gcAllowVeryLargeObjects being false in that they expect an exception to be thrown when allocating a very large array. Increase the number of array elements so that an OutOfMemoryException is always thown no matter what value gcAllowVeryLargeObjects has. 81*98*58*36*74*4 is 4906065024 which is larger than 2^32, the theoretical array length limit.
* Default gcAllowVeryLargeObjects to true * Update tests for gcAllowVeryLargeObjects These 2 tests appear to rely on gcAllowVeryLargeObjects being false in that they expect an exception to be thrown when allocating a very large array. Increase the number of array elements so that an OutOfMemoryException is always thown no matter what value gcAllowVeryLargeObjects has. 81*98*58*36*74*4 is 4906065024 which is larger than 2^32, the theoretical array length limit. Commit migrated from dotnet/coreclr@163983e
It seems to me that this option should be enabled by default in a new framework such as .NET Core.
The only reason I can think of why one might want to disable this option is poorly written unsafe code that assumes that objects can't be larger than 2GB and thus offsets can be represented using
int
. Any compat concerns?Fixes #8847