Bug 183455 - PATCH: fix 64 bit crashes
PATCH: fix 64 bit crashes
Product: Fedora
Classification: Fedora
Component: joe (Show other bugs)
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Ivana Varekova
: EasyFix, Patch
Depends On:
  Show dependency treegraph
Reported: 2006-03-01 04:07 EST by Hans de Goede
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-01 10:01:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
PATCH fixing joe on 64bit archs (588 bytes, patch)
2006-03-01 04:07 EST, Hans de Goede
no flags Details | Diff

  None (edit)
Description Hans de Goede 2006-03-01 04:07:27 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.
Comment 1 Hans de Goede 2006-03-01 04:07:27 EST
Created attachment 125454 [details]
PATCH fixing joe on 64bit archs
Comment 2 Ivana Varekova 2006-03-01 10:01:23 EST
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
version (joe-3.3-2).
Comment 3 Hans de Goede 2006-03-01 10:05:31 EST
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.
Comment 4 Warren Togami 2006-03-01 22:19:50 EST
I'm moving this into FC5 because it looks like negligible risk.

Note You need to log in before you can comment on or make changes to this bug.