Skip to content

boehmgc: disable SOFT_VDB on powerpc64le for version 8.2.2#199978

Merged
AndersonTorres merged 3 commits intomasterfrom
unknown repository
Nov 14, 2022
Merged

boehmgc: disable SOFT_VDB on powerpc64le for version 8.2.2#199978
AndersonTorres merged 3 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Nov 7, 2022

Description of changes

Upstream has not yet fixed the bug:

bdwgc/bdwgc#376

bdwgc/bdwgc#479

However there is a recommended workaround:

bdwgc/bdwgc#479 (comment)

This adds CFLAGS_EXTRA=-DNO_SOFT_VDB to the makeFlags, which prevents direct accesses to /proc being used for tracking dirtied pages (which must be rescanned):

https://github.com/ivmai/bdwgc/blob/54522af853de28f45195044dadfd795c4e5942aa/include/private/gcconfig.h#L741

The collector will fall back to using mprotect() to trigger page faults on writes to clean pages and maintain its own dirty bits, which is slightly less efficient but (in this case) more reliable. Unreliable page-dirtiness bits can lead to use-after-free() corruption; this is not a situation where disabling the tests is a good idea.

CC: @trofi @jiegec

Things done
  • Built on platform(s)
    • powerpc64le-linux
  • Tested compilation of a packagesthat depend on this chang: nix (with tests enabled)
  • Fits CONTRIBUTING.md.

Upstream has not yet fixed the bug:

  bdwgc/bdwgc#376
  bdwgc/bdwgc#479

However there is a recommended workaround:

  bdwgc/bdwgc#479 (comment)

This adds `CFLAGS_EXTRA=-DNO_SOFT_VDB` to the `makeFlags`, which
prevents direct accesses to `/proc` being used for tracking dirtied
pages (which must be rescanned):

  https://github.com/ivmai/bdwgc/blob/54522af853de28f45195044dadfd795c4e5942aa/include/private/gcconfig.h#L741

The collector will fall back to using mprotect() to trigger page
faults on writes to clean pages and maintain its own dirty bits,
which is slightly less efficient but (in this case) more reliable.
Unreliable page-dirtiness bits can lead to use-after-free()
corruption; this is not a situation where disabling the tests is a
good idea.
@ghost ghost mentioned this pull request Nov 7, 2022
14 tasks
@ofborg ofborg bot requested a review from AndersonTorres November 7, 2022 06:32
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Nov 7, 2022
@ghost ghost requested a review from AndersonTorres November 14, 2022 05:02
@AndersonTorres AndersonTorres merged commit d8b143d into NixOS:master Nov 14, 2022
@ghost ghost deleted the pr/boehmgc/powerpc64le branch January 23, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants