When trying to use a brain file generated on x86 on amd64 eggdrop segfaults. Reproducible: Always Steps to Reproduce: 1. Create brain file on x86. 2. Move brain file to amd64 and try to load it. Actual Results: Segfaults, or exits with the following error if compiled with USE="debug": [12:36] Creating megahal (type 1) [12:36] Creating learnall (type 1) [12:36] Creating freespeak (type 1) [12:36] *** MEMORY TABLE FULL: megahal:megahal.c (1275) [12:36] * Memory table full Expected Results: The file should load fine. This error is because of the following code in megahal.h(75): #define BYTE4 unsigned long This should instead be #define BYTE4 uint32_t and an additional include of stdint.h should be added.
Still valid with 1.6.21?
Should be. The source for the megahal module is in a patch provided by Gentoo and not by upstream, and that patch has not changed. That patch is patch/10_all_megahal.mod-2.7.patch from eggdrop-patches-${PATCHSET_V}.tar.bz2.
Looks like this currently applies to all versions. Compounding this problem is that the megahal module also forgets to htonl() and ntohl(). I think this should cause the same problem when going between big and little endian machines.
All thirdparty modules has been removed. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=758962f595fd876bef0d00e5ba392c1b925aa0c8 Author: Louis Sautier <sbraz@gentoo.org> Date: Fri Oct 26 10:32:23 2018 +0200 net-irc/eggdrop: remove ancient version Signed-off-by: Louis Sautier <sbraz@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11