The Racket repository
![]() The problem mainly affected `register-custodian-shutdown` from `ffi/unsafe/custodian`, which is used by `math/bigfloat` and `ffi/unsafe/com`. When a value is registered with a custodian, the value is held weakly, but the shutdown procedure is intended to be held strongly. At the C API level, the data associated with a shutdown function pointer is intended to be held strongly. A custodian itself, however, is retained weakly by other custodians in its family, so that custodians can be GCed and their elements transferred to a parent custodian. Since the custodian itself may be held only weakly, the callback & data in a custodian was effectively held weakly --- which, in turn, can break assumptions in code such as `ffi/unsafe/custodian` that expects strong references to prevent finalizers from running. Fix the problem by registering a reference to callback data as data in a custodian's finalizer, which makes the data strongly retained no matter how the custodian is retained. |
||
---|---|---|
native-pkgs@5f391155f2 | ||
pkgs | ||
racket | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.mailmap | ||
.travis.yml | ||
INSTALL.txt | ||
Makefile | ||
README.txt |
This is the source code for the main Racket distribution. See "INSTALL.txt" for information on building Racket. License ------- Racket Copyright (c) 2010-2013 PLT Design Inc. Racket is distributed under the GNU Lesser General Public License (LGPL). This means that you can link Racket into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify Racket; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular means that you must release the source code for the modified software. See racket/src/COPYING_LESSER.txt for more information.