Bug 114245 - compile time bugs
compile time bugs
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gaim (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Blizzard
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-25 08:32 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-12 14:07:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-01-25 08:32:08 EST
Description of problem:

I just tried to compile package gaim-0.71-2, from Redhat
Fedora Core 1.

The compiler said

1.

dispatch.c(194): warning #175: subscript out of range

The source code is

                char buf[4];

                strncpy(buf, command, 4);
                buf[4] = '\0';

Clearly wrong. Maybe extend the buffer to size 5 ?

2.

service.c(877): warning #268: the format string ends before this argument

The source code is

        faimdprintf(sess, 1, "data at 0x%08lx (%d bytes) of
requested\n", offset, len, modname ? modname : "aim.exe");

Only two % specifiers, but three parameters. I'm not sure what the fix
is for this.

3.

yahoo.c(565): warning #140: too many arguments in function call

The source code is

	f = yahoo_friend_new(*bud);

but, earlier in the file

static struct yahoo_friend *yahoo_friend_new()
{

I'm not sure what the fix is for this.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 Jef Spaleta 2004-01-31 00:25:05 EST
I'm closing this as worksforme.
I'm not sure why you are getting those errors
rpmbuild --rebuild gaim-0.71-2.src.rpm 
rebuilds a binary package for me. 
And I've recieved confirmations from people I asked to rebuild this
package. Can't seem to reproduce these compiler errors.
Check your development environment, and try the new packages listed in
comment 1

I see a few compiler warnings
but none of the warnings you have indicated:
oscar.c: In function `gaim_icqinfo':
oscar.c:3925: warning: `%x' yields only last 2 digits of year in some
locales
yahoo.c: In function `yahoo_do_group_check':
yahoo.c:454: warning: dereferencing type-punned pointer will break
strict-aliasing rules
yahoo.c:454: warning: dereferencing type-punned pointer will break
strict-aliasing rules
plugin.c: In function `gaim_plugin_probe':
plugin.c:191: warning: dereferencing type-punned pointer will break
strict-aliasing rules
dialogs.c: In function `create_away_mess':
dialogs.c:1619: warning: dereferencing type-punned pointer will break
strict-aliasing rules
Comment 3 d.binderman 2004-01-31 05:03:16 EST
>I'm closing this as worksforme.

Please re-open.

>I'm not sure why you are getting those errors

I compile with the Intel C 8.0 compiler. The format
of the warning messages are different to the GNU C compiler.

I used the Intel compiler to get a second opinion on the code.

Intel found obvious bugs in the code that the GNU C compiler didn't.

I expect that if you used the usual GNU C compiler, you would see no 
problem.

I'm surprised you need to be able to duplicate the problems.
The code is obviously broken in a few places.

I'll get back to you on the veracity of the updates.
Comment 4 Bart Martens 2004-01-31 10:55:16 EST
Mr Binderman, I agree with you that the errors/warnings need fixing.
But they may already have been fixed in more recent versions, see
comment 1. I suggest you report the remaining errors/warnings, or,
even better, send patches, to the upstream developers.

I also fully agree with Jef to close this bug report here.
Comment 5 Jef Spaleta 2004-01-31 19:31:28 EST
If you open up a bug...upstream..please report back
to this report with the new upstream bug url or mailinglist post url.
I can close this bug out once I know the problem is moved
upstream...hopefully with patches :->
Comment 6 d.binderman 2004-02-01 03:38:12 EST
>Do you have the same problem with these versions?

0.74-5 has all the problems that 0.71-2 has, and some more ;-<

0.75 has the format string problem.

I'm guessing that 0.75 is the latest version, so IMHO it would be 
sufficient to 

a) check visually that the subscript out of range && too many
arguments bugs are gone in 0.75.

b) fix the format string problem in 0.75.

c) trash 0.74-5


Comment 7 Christopher Blizzard 2004-02-12 14:07:03 EST
I'm not fixing problems related to the intel C compiler.
Comment 8 d.binderman 2004-02-13 04:41:14 EST
>I'm not fixing problems related to the intel C compiler.

Sometimes, you can lead a thirsty horse to water but
you still can't make it drink.

The code is broken. GNU C compiler can't find the bugs. 
I used Intel C compiler to find the bugs.

I've already described what I believe to be a reasonable
course of action.





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