Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Warning when compiling pandas/_libs/algos.c #58829

Open
3 tasks done
TabLand opened this issue May 26, 2024 · 0 comments
Open
3 tasks done

BUG: Warning when compiling pandas/_libs/algos.c #58829

TabLand opened this issue May 26, 2024 · 0 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@TabLand
Copy link

TabLand commented May 26, 2024

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

Build pandas from commit b162331554d7c7f6fd46ddde1ff3908f2dc8bcce and review build logs

Issue Description

gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DOPENSSL_NO_SSL3 -fPIC -DNPY_NO_DEPRECATED_API=0 -Ipandas/_libs/include -I/home/ijtaba/.pyenv/versions/pandas-dev/lib/python3.9/site-packages/numpy/core/include -I/home/ijtaba/.pyenv/versions/pandas-dev/include -I/home/ijtaba/.pyenv/versions/3.9.10/include/python3.9 -c pandas/_libs/algos.c -o build/temp.linux-x86_64-3.9/pandas/_libs/algos.o
    In file included from pandas/_libs/algos.c:1270:
    pandas/_libs/include/pandas/vendored/klib/khash_python.h: In function ‘traced_realloc’:
    pandas/_libs/include/pandas/vendored/klib/khash_python.h:39:7: warning: pointer ‘old_ptr’ may be used after ‘realloc’ [-Wuse-after-free]
       39 |       PyTraceMalloc_Untrack(KHASH_TRACE_DOMAIN, (uintptr_t)old_ptr);
          |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/include/pandas/vendored/klib/khash_python.h:36:15: note: call to ‘realloc’ here
       36 |   void *ptr = realloc(old_ptr, size);
          |               ^~~~~~~~~~~~~~~~~~~~~~

Expected Behavior

No warnings

Installed Versions

0+untagged.35052.g5db4dd6
@TabLand TabLand added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

1 participant