-
Notifications
You must be signed in to change notification settings - Fork 950
compiler,runtime: allow map values >256 bytes #3377
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
compiler,runtime: allow map values >256 bytes #3377
Conversation
Wonder if I should extend the Edit: And I wonder if the type should be |
Whatever size we pick, we should really add a new check to make sure the key and value are in range. (Technically not part of the fix but it would be great to have, perhaps as a separate commit).
Yeah |
Looks good to me. @aykevl any other feedback before merge? |
Hmm... the first time the CI tests ran there was a OOM from one of the stdlib tests. I think I got another OOM when running the test corpus. I'm not sure if they'll be solved by the precise-GC. But I'm not happy at the moment with merging this until I know what's going on. (That either it is the uintptr change causing the OOM and that the precise GC solves it). |
So indeed as-is this PR causes a corpus OOM-failure for |
Huh, that's kind of unexpected. Unless lapack/gonum creates a massive number of small maps, I don't see how that could easily create an OOM. It's just a few extra bytes. Unless it was already really close to the limit and this pushed it over the limit. |
@aykevl More likely it's the more pointer-sized integers pinning allocations, hence why the precise GC solves the issue. |
That would be rather surprising. Those pointer-sized integers only store relatively small values, far too small to look like a pointer (unless you have absolutely gargantuan types like |
Shrug. No idea then. I'm fine to hold off merging this if you think we should investigate more. |
Actually the precise GC probably won't affect the map code since the map-internal allocations don't have any associated layout information. Hmm..... |
It does affect this code though, which is a normal allocation: Lines 76 to 84 in b5ad81c
But still, map creation shouldn't be that frequent. |
@dgryski can you try rebasing on the dev branch now that precise GC is in? |
df2061a
to
2b0a7e3
Compare
Rebased. Running the test corpus now. |
Boo.
Edit: inconsistent passes if I run it in isolation, even without this particular change (
|
That is a better explanation for why the precise GC had any effect: it probably didn't (but the test was flaky). |
Ok, then this is safe to merge I guess. |
No description provided.