Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BUG: Compiler Flag Drift May Affect Pandas ABI Stability via Memory Assumptions #61452

Closed
Labels
BugBuildLibrary building on various platforms
@BryteLite

Description

@BryteLite

Pandas version checks

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

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

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

Reproducible Example

importpandasaspdimportnumpyasnp# Create a structured array with alignment-sensitive typesdtype=np.dtype([('x',np.int64), ('y',np.float64)])arr=np.zeros(10,dtype=dtype)# Wrap into DataFramedf=pd.DataFrame(arr)# Trigger complex alignment pathtry:# Operation that depends on consistent field layoutdf_sum=df.sum(numeric_only=True)print("Sum result:",df_sum)exceptExceptionase:print("Failure during structured alignment test:",e)

Issue Description

Summary

Pandas may be vulnerable to ABI and memory alignment issues caused by C23 default behaviors in GCC 15.1. Silent adoption of padding behavior changes — particularly in union or struct definitions used in NumPy or Pandas C extensions — may lead to unpredictable runtime behavior.

This issue was originally identified in NumPy and Cython. As Pandas includes both compiled Cython code and relies on NumPy for internal memory layout, it is downstream vulnerable.

These compiled pieces are sensitive to pointer alignment, ABI expectations, or padding behaviors — especially across environments.

Reproducible Example

Please see section below

Possibly related to:

Report for more context:
Report

Expected Behavior

Recompile NumPy and Pandas with mismatched flags.

Then run the If padding bits are not cleared correctly in C structs, or if a layout mismatch occurs due to vendor/flag drift, crashes or incorrect math results may emerge.

CFLAGS="-std=c23" pip install numpy pandas --force-reinstall --no-cache-dir when #building

Installed Versions

NumPy latest 3.13 release, Pandas latest 3.13 release are suitable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBuildLibrary building on various platforms

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp