Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable gcAllowVeryLargeObjects on FsiAnyCpu #2135

Merged
merged 4 commits into from
Jan 3, 2017

Conversation

saul
Copy link
Contributor

@saul saul commented Dec 30, 2016

Fixes #100.

The documentation for this feature states:

Before enabling this feature, ensure that your application does not include unsafe code that assumes that all arrays are smaller than 2 GB in size. For example, unsafe code that uses arrays as buffers might be susceptible to buffer overruns if it is written on the assumption that arrays will not exceed 2 GB.

I had a scan through the FSI code and took a look through the rest of the solution but found nothing of the sort.

@msftclas
Copy link

Hi @saul, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, MSBOT;

@KevinRansom
Copy link
Member

I believe the warning applies also to libraries that are referenced using #r. I wonder whether this should be the only choice for 64 bit FSI or should it be an IDE option?

@saul
Copy link
Contributor Author

saul commented Dec 30, 2016

Kevin if that's the case, then can't the user remove that line from the app config in the same way users currently add it?

I can't imagine libraries that are assuming the maximum sizes of arrays are plentiful, especially so ones that are used often. Even if it were the case, it sounds like a bug with the library as opposed to FSI.

@KevinRansom
Copy link
Member

@saul
The thing is I don't really know why the default for 64 bit CLR apps is off. I will root around upstairs and see if I can find someone who can give me a cogent explanation. I can think of a few possibilities ... however, the ones I come up with in my head don't really hold water.

Without a decent explanation I don't know that I feel comfortable changing the default for FSI. Now I would be fine if there was an option in the VS tools to easily switch it.

As for whether it's a bug or not in the library, it could be. However, it's a bug that an app developer would have to go out of his way to provoke, and so it may just be a thing.

I would also guess that as well as switching the flag an ngen would be required for anything that is ngened. Anyway, let me have a root around and see if I can find ut why the default is the way it is.

Kevin

@KevinRansom
Copy link
Member

@JANKOTAS

Hey Jan do you have any idea why the default for the 64 bit managed process gc has allow very large object false?

Are there performance or compatability penalties associated with this option?

Thanks

Kevin

@KevinRansom
Copy link
Member

@saul

I chatted with Vance. We can't think of any real issue with enabling this always in 64 bit FSI.

@KevinRansom
Copy link
Member

@saul

Thank you for pushing on this.

Kevin

@KevinRansom KevinRansom merged commit ac10de1 into dotnet:master Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants