You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: