From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
Description of problem:
The ttcp program crashes when running on an IA-64 version
of RedHat 7.2
The reason for this, is a missing
in the beginning of the program's (ttcp.c) source file.
Thus the return of the function malloc in the program
is declared as (int) by the compiler and on a 64 bit
IA-64 the program will crash.
Geert Albert Smant
Version-Release number of selected component (if applicable):
Steps to Reproduce:
It is easily reproducable if you open 2 windows on an IA-64
system and type the following commands:
in the first window you type:
$ ttcp -r -s
and in the second window you type:
$ ttcp -v -t -s localhost
Actual Results: the program will core dump
This problem is fixed when the ttcp.c program is re-compiled
when the following line has been added to the list of
'#include' statements in the beginning of the source file:
Created attachment 110012 [details]
fix malloc issue + polish source code (clean compile)
This bug was reported in Redhat 7.2, but still persists in FC3.
ttcp does not include stdlib.h, the right header to get malloc defined
(according to C99).
On IA64, sizeof(int) is 4 but sizeof(void *) is 8.
Thus, all allocated pointers are trimmed and ttcp core dumps.
In the attached patch, I have fixed this + polished ttcp to get a clean compile
(tested on FC3/i686, debian GNU/Linux on IA64, FreeBSD 4.10).
Please please, include this patch - although I acknowledge that IA64 is not
really supported by the Fedora Project now.
Fixed in -11, soon in FC devel.