Problem report: Struct aliasing problem causes Thread_Ready_Chain corruption in

Ralf Corsepius ralf.corsepius at
Wed Nov 22 04:18:54 UTC 2006

On Tue, 2006-11-21 at 15:50 -0800, Till Straumann wrote:
> linux (2.6.18) is built with -fno-strict-aliasing
Well, the Linux kernel has long record of clashing with GCC, rsp. GCC
having broken  "unclear spots" inside of Linux.

>  and I believe that's what we
> should do. It is extremely hard to find all problematic cases of aliasing
> and as someone pointed out, as gcc gets smarter we'll run into more
> problems.
We can't avoid having to identify and fixing all those spots and
therefore MUST NOT use -fno-strict-aliasing. In fact, a long series of
changes having gone into rtems > 4.6 actually originates from this

> Look e.g., at networking code where a checksum of a header is computed.
> Type-punning is pretty common in these situations and I wouldn't trust
> old BSD code to be written with strict aliasing in mind.
Right, "punned pointers" need to be taken seriously and need to be
looked after, but I am more concerned about some very basic RTEMS
internal structs, such as the "Chain" and the "Object" code.


More information about the users mailing list