Skip to content

[release/7.0] fix div by zero in gen size calculation - #76334

Merged
carlossanlop merged 1 commit into
release/7.0from
backport/pr-76294-to-release/7.0
Sep 29, 2022
Merged

[release/7.0] fix div by zero in gen size calculation#76334
carlossanlop merged 1 commit into
release/7.0from
backport/pr-76294-to-release/7.0

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Sep 28, 2022

Copy link
Copy Markdown
Contributor

Backport of #76294 to release/7.0

/cc @Maoni0

Customer Impact

This was reported with #76257. It's a bug that only shows up with regions. With segments, because we always allocate a min object in each generation to indicate the generation start, the size can never be 0. With regions we no long need to but this also means a generation size can be 0. The workaround is unacceptable to the customer -

it is not easy to disable floating point exception around garbage collector because it may be called everywhere. Net 6 and older versions (and the mono runtime) don't need such a workaround. In the HPC world it is a common practice to trap FPE to detect false numerical results. I agree that some .Net libraries may not support that but if the runtime doesn't have this new limitation it is better.

Testing

I tested this under the debugger. I can see the div zero exception and with the fix I no longer see it.

Risk

Not for a servicing release.

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

@ghostghost added the area-GC-coreclr label Sep 28, 2022
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #76294 to release/7.0

/cc @Maoni0

Customer Impact

Testing

Risk

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Author:github-actions[bot]
Assignees:-
Labels:

area-GC-coreclr

Milestone:-

@carlossanlop

Copy link
Copy Markdown
Contributor

@Maoni0 if this is ready, can you please add the servicing-consider label and send an email to Tactics requesting approval?

@Maoni0Maoni0 added the Servicing-consider Issue for next servicing release review label Sep 28, 2022
@carlossanlopcarlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 29, 2022
@carlossanlop

Copy link
Copy Markdown
Contributor

Approved by Tactics via email. Signed off.
CI failure was a timeout cancellation in OSX NativeAOT.
Ready to merge. :shipit:

@carlossanlop
carlossanlop merged commit 9930d32 into release/7.0Sep 29, 2022
@carlossanlop
carlossanlop deleted the backport/pr-76294-to-release/7.0 branch September 29, 2022 00:58
@carlossanlopcarlossanlop added this to the 7.0.0 milestone Sep 29, 2022
@ghostghost locked as resolved and limited conversation to collaborators Oct 29, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-GC-coreclrServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@carlossanlop@mangod9@Maoni0