Skip to content

Commit 7cece23

Browse files
committed
Don't check the symbol's fstr at shutdown
During Ruby's shutdown, we no longer need to check the fstr of the symbol because we don't use the fstr anymore for freeing the symbol. This can also fix the following ASAN error: ==2721247==ERROR: AddressSanitizer: use-after-poison on address 0x75fa90a627b8 at pc 0x64a7b06fb4bc bp 0x7ffdf95ba9b0 sp 0x7ffdf95ba9a8 READ of size 8 at 0x75fa90a627b8 thread T0 #0 0x64a7b06fb4bb in RB_BUILTIN_TYPE include/ruby/internal/value_type.h:191:30 #1 0x64a7b06fb4bb in rb_gc_shutdown_call_finalizer_p gc.c:357:18 #2 0x64a7b06fb4bb in rb_gc_impl_shutdown_call_finalizer gc/default/default.c:3045:21 #3 0x64a7b06fb4bb in rb_objspace_call_finalizer gc.c:1739:5 #4 0x64a7b06ca1b2 in rb_ec_finalize eval.c:165:5 #5 0x64a7b06ca1b2 in rb_ec_cleanup eval.c:256:5 #6 0x64a7b06c98a3 in ruby_cleanup eval.c:179:12
1 parent 75f25e5 commit 7cece23

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

gc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,6 @@ rb_gc_shutdown_call_finalizer_p(VALUE obj)
353353
return true;
354354

355355
case T_SYMBOL:
356-
if (RSYMBOL(obj)->fstr &&
357-
(BUILTIN_TYPE(RSYMBOL(obj)->fstr) == T_NONE ||
358-
BUILTIN_TYPE(RSYMBOL(obj)->fstr) == T_ZOMBIE)) {
359-
RSYMBOL(obj)->fstr = 0;
360-
}
361356
return true;
362357

363358
case T_NONE:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy