diff -r 110e3c57792a rpython/memory/gctypelayout.py --- a/rpython/memory/gctypelayout.py Wed Feb 07 09:39:56 2018 -0500 +++ b/rpython/memory/gctypelayout.py Wed Feb 07 12:01:23 2018 -0500 @@ -241,10 +241,10 @@ infobits |= T_HAS_GCPTR # fptrs = builder.special_funcptr_for_type(TYPE) + customdata = lltype.malloc(GCData.CUSTOM_DATA_STRUCT, flavor='raw', + immortal=True) + info.customdata = customdata if fptrs or has_special_memory_pressure(TYPE): - customdata = lltype.malloc(GCData.CUSTOM_DATA_STRUCT, flavor='raw', - immortal=True) - info.customdata = customdata if "destructor" in fptrs: customdata.customfunc = fptrs["destructor"] if "old_style_finalizer" in fptrs: