fabric icon indicating copy to clipboard operation
fabric copied to clipboard

possible null Registry access in resource conditions API

Open MehVahdJukaar opened this issue 7 months ago • 1 comments

in DataPackContentsMixin, which targets the ReloadableServerResources class reload method, a thread local is set ResourceConditionsImpl.CURRENT_REGISTRIES. this field is later accessed inside the reloader which assumes the reload happens on same thread. That is not guaranteed, nothing stops a mod from wrapping the returned reload instance and run it in another thread. To me this reliance on thread local static field to pass that registry access along seems very brittle

MehVahdJukaar avatar Aug 03 '25 01:08 MehVahdJukaar

It should be noted that the only major version that this issue pertains to is 1.20.1.

PepperCode1 avatar Aug 03 '25 01:08 PepperCode1