belangeo / pyo

Python DSP module
GNU Lesser General Public License v3.0
1.28k stars 130 forks source link

Fix Undefined Behavior (Win 032bit) #249

Closed CristiFati closed 1 year ago

CristiFati commented 1 year ago

SF_INFO.frames is typed as sf_count_t, which is a __int64 typedef (sndfile.h).

Py_BuildValue's l flag converts a C long int.

This yields Undefined Behavior (check [SO]: _csv.Error: field larger than field limit (131072) (@CristiFati's answer) for more details) on 032bit Nixes and Win (it works on others purely coincidental).

Crashes Python pc032 (only) on Win. [SO]: Can't install pyo using pip (@CristiFati's answer) (the SfPlayer line at the end).

Linking #248.