* Serious warnings from RH 6.1 SRPMs on alpha
@ 1999-11-02 15:23 Brad Lucier
1999-11-02 15:40 ` Christian Iseli
0 siblings, 1 reply; 5+ messages in thread
From: Brad Lucier @ 1999-11-02 15:23 UTC (permalink / raw)
To: axp-list; +Cc: lucier
There was some discussion on this list about the RH 6.1 SRPMs building
just fine on alpha, so I downloaded the ones I found at a local RH mirror
and ran an rpm --rebuild on all of them using gcc-2.95.1 and binutils
2.9.5.0.16+some 64bit patches.
The results were not encouraging. There were many, many warnings of the
following type in many rpm builds:
Installing diffutils-2.7-16.src.rpm
regex.c:3997: warning: cast from pointer to integer of different size
regex.c:3997: warning: cast from pointer to integer of different size
regex.c:4003: warning: cast to pointer from integer of different size
regex.c:4003: warning: cast to pointer from integer of different size
etc.
In my (limited) experience, this type of warning almost always indicates
that someone is (a) trying to store a pointer in an int variable without
(b) knowing that an int is 32 bits and a pointer is 64 bits on alpha
linux.
Other possibly serious errors include ones of the type
Installing clock-1.1-6.src.rpm
clock-alpha.c:498: warning: int format, different type arg (arg 4)
clock-alpha.c:505: warning: int format, different type arg (arg 2)
clock-alpha.c:609: warning: int format, different type arg (arg 2)
clock-alpha.c:700: warning: int format, different type arg (arg 4)
since this mucks up the argument stack frame in varargs.
Other things that are not so serious, but which may hide other problems are
Installing compat-binutils-5.2-2.9.1.0.23.1.src.rpm
argv.c:122: warning: type mismatch in implicit declaration for built-in function `strcpy'
(strcpy, strlen, and friends return a long on the alpha.)
Another warning I don't like is:
Installing XFree86-3.3.5-3.src.rpm
mpctoi.c:608: warning: comparison is always true due to limited range of data ty
pe
mpctoi.c:927: warning: comparison is always false due to limited range of data t
ype
So I'm not really optimistic about 6.1 if RedHat just compiles and ships
the current sources out the door.
It would be a large effort to correct all these warnings, many of which are
almost certainly errors. But the source is with us.
The file containing the warnings and list of rpms is at
http://www.math.purdue.edu/~lucier/RH-6.1-warnings.gz
Unfortunately, the build of glibc-2.1.2 got hosed because of clock
skew (of about 20 years, I believe ;-), and another rpm didn't build
to completion.
Brad Lucier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Serious warnings from RH 6.1 SRPMs on alpha
1999-11-02 15:23 Brad Lucier
@ 1999-11-02 15:40 ` Christian Iseli
0 siblings, 0 replies; 5+ messages in thread
From: Christian Iseli @ 1999-11-02 15:40 UTC (permalink / raw)
To: axp-list
lucier@math.purdue.edu said:
> In my (limited) experience, this type of warning almost always
> indicates that someone is (a) trying to store a pointer in an int
> variable without (b) knowing that an int is 32 bits and a pointer is
> 64 bits on alpha linux.
IIRC, this is true to some extent, but not always. For example, one could
imagine a struct like so:
struct _foo {
void *stuff;
};
which you would use to pass various data around. If you do things like:
struct _foo f;
int bar;
f.stuff = bar; /* Get a warning */
...
bar = f.stuff; /* Get a warning */
you should be ok. I'm not saying this is good programming practice BTW ;-)
lucier@math.purdue.edu said:
> Unfortunately, the build of glibc-2.1.2 got hosed because of clock
> skew (of about 20 years, I believe ;-), and another rpm didn't build
> to completion.
Didn't it get hosed because you have a recent 2.2 kernel tree installed ? The
math stuff in recent (not sure from which version) kernel causes problems when
compiling glibc-2.1.x... Also, I'm not sure stock gcc-2.95.x can deal with
the complex numbers from glibc-2.1.x, it needs a patch IIRC.
Anyway, I'm running on an alpha on which I compiled and installed a lot of
SRPMS from 6.x, and I don't see that many problems... ;-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Serious warnings from RH 6.1 SRPMs on alpha
@ 1999-11-02 15:59 Wessels, Hans
1999-11-02 17:09 ` Michal Jaegermann
0 siblings, 1 reply; 5+ messages in thread
From: Wessels, Hans @ 1999-11-02 15:59 UTC (permalink / raw)
To: 'axp-list@redhat.com'
>Van: Christian Iseli[SMTP:chris@ludwig-alpha.unil.ch]
>Onderwerp: Re: Serious warnings from RH 6.1 SRPMs on alpha
>
>lucier@math.purdue.edu said:
>> In my (limited) experience, this type of warning almost always
>> indicates that someone is (a) trying to store a pointer in an int
>> variable without (b) knowing that an int is 32 bits and a pointer is
>> 64 bits on alpha linux.
>
>IIRC, this is true to some extent, but not always. For example, one could
>imagine a struct like so:
>struct _foo {
> void *stuff;
>};
>which you would use to pass various data around. If you do things like:
> struct _foo f;
> int bar;
> f.stuff = bar; /* Get a warning */
> ...
> bar = f.stuff; /* Get a warning */
>you should be ok. I'm not saying this is good programming practice BTW ;-)
An other way is:
void foo(char *p)
{
int alignment;
alignment = ((int) p) &0x0F; /* Get a warning */
...
}
Anyone how to do this without getting a warning?
Bye, Hans
----------------------------------------------------------------------
/| /\/\/\ |\ ir. Hans Wessels
/ | / /\/\ \ | \ H.Wessels@Energie-Delfland.nl
/ | / / /\ \ \ | \ tel.: 015 251 4397
/ |/ / / \ \ \| \
\ |\ \ \ / / /| / prive:
\ | \ \ \/ / / | / mr_ni@mbh.org
\ | \ \/\/ / | / Fidelus Bittus et Fuckus Clockcyclus!
\| \/\/\/ |/
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Serious warnings from RH 6.1 SRPMs on alpha
1999-11-02 15:59 Serious warnings from RH 6.1 SRPMs on alpha Wessels, Hans
@ 1999-11-02 17:09 ` Michal Jaegermann
0 siblings, 0 replies; 5+ messages in thread
From: Michal Jaegermann @ 1999-11-02 17:09 UTC (permalink / raw)
To: axp-list
Wessels, Hans wrote:
>
> An other way is:
> void foo(char *p)
> {
> int alignment;
> alignment = ((int) p) &0x0F; /* Get a warning */
> ...
> }
>
> Anyone how to do this without getting a warning?
int foo(char *p)
{
int alignment;
long atmp;
atmp = ((long) p) &0x0FL;
return (alignment = atmp);
}
Actually a generated assembler will be much simpler than
you can expect. See for yourself. :-)
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Serious warnings from RH 6.1 SRPMs on alpha
@ 1999-11-02 17:18 Brad Lucier
0 siblings, 0 replies; 5+ messages in thread
From: Brad Lucier @ 1999-11-02 17:18 UTC (permalink / raw)
To: axp-list; +Cc: lucier
The replies seem to want to educate me about the many ways that these
warnings may be spurious messages for perfectly good code, or that I
suggested the wrong way to fix these, or that I used the wrong compiler,
or how to fix my clock. Fine. That's not my point. Among other things,
I didn't build the rpms to install them (not after spending months trying
to get a semi-stable 6.0 system), just to find out where problems may
be lurking.
My point is that these messages often indicate real problems, and that
there are one hell of a lot of them. And I see enough "unaligned access"
messages in /var/log/messages and crashes of various tools from RH 6.0 to
indicate that there are real problems lurking among these many warning
messages. People don't have to address that point in their replies,
but I have a feeling that my previous mail to the list didn't make that
point clearly enough.
Brad
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-11-02 17:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-11-02 15:59 Serious warnings from RH 6.1 SRPMs on alpha Wessels, Hans
1999-11-02 17:09 ` Michal Jaegermann
-- strict thread matches above, loose matches on Subject: below --
1999-11-02 17:18 Brad Lucier
1999-11-02 15:23 Brad Lucier
1999-11-02 15:40 ` Christian Iseli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox