Red Hat Bugzilla – Bug 183455
PATCH: fix 64 bit crashes
Last modified: 2007-11-30 17:11:25 EST
Description of problem:
I was debugging something else and because of that had LD_PRELOAD=libefence.so
set (malloc debugger).
This caused joe to crash, upon investigation I found 2 serious bugs in joe:
-termcap.c uses functions from term.h but doesnot include term.h, some of the
functions return a pointer (64 bits) but because of the lacking header and thus
lacking prototype, they get an implicit prototype with a retval of int (32
bits). Its a miracle this doesnot cause crashes without ElectricFence.
-i18n.c uses joe_malloc without including utils.h where this function is
declared, causing essentially the same problem I didn't trigger this bug,
but I found it by reviewing the compiler warnings.
The attached patch fixes these. It is definetly worth (post FC-5 madness?) to
take a look at the other compiler warnings too. There are more implicit function
decleration warnings such as:
kbd.c:364: warning: implicit declaration of function 'msgnw'
Also there are missing return warnings additional to the one reported in bug 137025.
Please apply this patch and push a build before FC-5, this is a clean fix and
editors crashing after hours of work is not what makes people happy.
Created attachment 125454 [details]
PATCH fixing joe on 64bit archs
Thank you for your bug report and patch.
It is too late to fix this problem in fc5, but it will be fixed in the next
Thanks for accepting the patch, but why is it too late for FC5? According to:
Bugfixes will still be allowed and this is very clearly a bug fix and a rather
severe bug (crashing editors don't make good marketing).
The fix is obviously right, the chance for regresssions almost 0, and it fixes a
_real_ problem not some minor nuissance, please concider including this in FC5.
I'm moving this into FC5 because it looks like negligible risk.