Strict aliasing and chains revisited

Gedare Bloom gedare at gwmail.gwu.edu
Tue Oct 26 19:27:33 UTC 2010


On Tue, Oct 26, 2010 at 2:49 AM, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 10/26/2010 07:15 AM, Chris Johns wrote:
> > On 25/10/10 6:19 AM, Till Straumann wrote:
> >> On 10/25/2010 12:38 AM, Sebastian Huber wrote:
> >>> On 10/21/2010 05:42 PM, Till Straumann wrote:
> >>>> On 10/21/2010 12:51 AM, Sebastian Huber wrote:
> >>>>> On 10/21/2010 01:49 AM, Till Straumann wrote:
> >>>
> >>> typedef union {
> >>> struct {
> >>> Chain_Node Node;
> >>> Chain_Node *fill;
> >>> } Head;
> >>>
> >>> struct {
> >>> Chain_Node *fill;
> >>> Chain_Node Node;
> >>> } Tail;
> >>> } __attribute__ ((packed)) Chain_Control;
> >>>
> >
> > I have also similar solution. I have not had email for the last few days
> > due to average networks while travelling.
> >
> > Why the packed attribute ?
>
> In the thread from 2006
>
> http://www.rtems.com/ml/rtems-users/2006/november/msg00096.html
>
> some said that this my be necessary on some architectures to guarantee the
> overlapping.  I am not sure about this.  We may omit the packed attribute
> and
> see what the test suites say.
>
> >
> >>> Test suites pass on ARM, MIPS and SPARC. One problem with this change
> >>> is that
> >>> the field names change, and this may break applications which use this
> >>> internal
> >>> API.
> >>>
> >> This can also be seen as an advantage since it exposes
> >> violations of the alias rule.
> >>
> >
> > Agreed. I have cleaned up the const bits of the API and fixing all the
> > broken bits. Sebastian, I did this while on the road and without email
> > access and so did not know you had a solution. What should we do ?
>
> You may have a look at
>
> https://www.rtems.org/bugzilla/show_bug.cgi?id=1711
>
> It should be quite similar to your fixes.  Can you please check in what you
> prefer?
>
> >
> > Also is 4.10 ok ?
> >
> > Chris
>
> Maybe we should discard the 4.10 branch and use the current CVS head as a
> new
> 4.10 branch starting point after these changes.  My feeling is that the
> current
> CVS head is pretty stable.
>
> There are some problems with using the current CVS head as the 4.10 cut.
Probably the biggest issue is the per-cpu patch set.  Also, users may have
already started using the 4.10 branch for development/testing, which would
affect them.
-Gedare


> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
> Phone   : +49 89 18 90 80 79-6
> Fax     : +49 89 18 90 80 79-9
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20101026/b35f993a/attachment-0001.html>


More information about the users mailing list