eggheads / eggdrop

The Eggdrop IRC Bot
GNU General Public License v2.0
494 stars 88 forks source link

python mod reload crash #1626

Open michaelortmann opened 1 week ago

michaelortmann commented 1 week ago
.loadmod python
.unloadmod python
.loadmod python
[...]
double free or corruption (out)
Aborted (core dumped)

crashes in line

https://github.com/eggheads/eggdrop/blob/4c421166aac2ca4d35cc1942c55c34713433e55b/src/mod/python.mod/python.c#L86C3-L86C21

My attempt like

if (!PyDateTimeAPI)
  PyDateTime_IMPORT;

didnt fix.

eggdrop version 4c421166aac2ca4d35cc1942c55c34713433e55b python version 3.12.3

See also: https://bugs.python.org/issue34309

Could be we have to fallback to forbid unloading of python.mod