File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -4073,10 +4073,18 @@ JL_DLLEXPORT jl_value_t *jl_gc_internal_obj_base_ptr(void *p)
4073
4073
// before the freelist pointer was either live during the last
4074
4074
// sweep or has been allocated since.
4075
4075
if (gc_page_data (cell ) == gc_page_data (pool -> freelist )
4076
- && (char * )cell < (char * )pool -> freelist )
4076
+ && (char * )cell < (char * )pool -> freelist ) {
4077
4077
goto valid_object ;
4078
- else
4079
- return NULL ;
4078
+ }
4079
+ else {
4080
+ jl_taggedvalue_t * v = pool -> freelist ;
4081
+ while (v != NULL ) {
4082
+ if (v == cell ) {
4083
+ return NULL ;
4084
+ }
4085
+ v = v -> next ;
4086
+ }
4087
+ }
4080
4088
// Not a freelist entry, therefore a valid object.
4081
4089
valid_object :
4082
4090
// We have to treat objects with type `jl_buff_tag` differently,
You can’t perform that action at this time.
0 commit comments