Skip to content

BUG: Reductions fail full cleanup on some errors #24003

@seberg

Description

@seberg

In some error paths in reduction full cleanup is failing:

**663466** **********************************************************************
**663466** build/testenv/lib/python3.9/site-packages/numpy/core/tests/test_ufunc.py::TestUfunc::test_reduction_where_initial_needed
**663466** **********************************************************************
==663466== 1,120 (+1,120) (928 (+928) direct, 192 (+192) indirect) bytes in 1 (+1) blocks are definitely lost in loss record 48,613 of 53,985
==663466==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==663466==    by 0x71E057E: NpyIter_AdvancedNew (nditer_constr.c:200)
==663466==    by 0x7218B86: PyUFunc_ReduceWrapper (reduction.c:282)
==663466==    by 0x7234FDB: PyUFunc_Reduce (ufunc_object.c:3080)
==663466==    by 0x7234FDB: PyUFunc_GenericReduction (ufunc_object.c:4210)

Also the following error, but it should be the identical issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions