File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,19 @@ impl Task {
228
228
_ => ( )
229
229
}
230
230
231
+ // FIXME #8302: Dear diary. I'm so tired and confused.
232
+ // There's some interaction in rustc between the box
233
+ // annihilator and the TLS dtor by which TLS is
234
+ // accessed from annihilated box dtors *after* TLS is
235
+ // destroyed. Somehow setting TLS back to null, as the
236
+ // old runtime did, makes this work, but I don't currently
237
+ // understand how. I would expect that, if the annihilator
238
+ // reinvokes TLS while TLS is uninitialized, that
239
+ // TLS would be reinitialized but never destroyed,
240
+ // but somehow this works. I have no idea what's going
241
+ // on but this seems to make things magically work. FML.
242
+ self . storage = LocalStorage ( ptr:: null ( ) , None ) ;
243
+
231
244
// Destroy remaining boxes. Also may run user dtors.
232
245
unsafe { cleanup:: annihilate ( ) ; }
233
246
}
You can’t perform that action at this time.
0 commit comments