* [Bug c/37954] odd sized packed structures, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
@ 2008-10-29 19:44 ` pinskia at gcc dot gnu dot org
2008-10-29 19:49 ` damon dot michaels at navico dot com
` (12 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-10-29 19:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-10-29 19:44 -------
Do you have an example code that shows this? I almost want to say this is
expected behavior.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c/37954] odd sized packed structures, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
2008-10-29 19:44 ` [Bug c/37954] " pinskia at gcc dot gnu dot org
@ 2008-10-29 19:49 ` damon dot michaels at navico dot com
2008-10-29 19:52 ` damon dot michaels at navico dot com
` (11 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: damon dot michaels at navico dot com @ 2008-10-29 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from damon dot michaels at navico dot com 2008-10-29 19:49 -------
Subject: RE: odd sized packed structures, under ARM, cause lockup of
application
Yes, I'm figuring out how to move it from VMWare to my Windows system.
It is unexpected to me. X86 doesn't do it under 3 different compilers
(one of which is GCC). I understand why under ARM it does it at the
assembly level.
I'm completely new to Linux, and this bug reporting mechanism. Although
I'm an old Unix hand from 1983... it's all coming back to me now. <grin>
So please bear with me!
Thx,
-D
-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: Wednesday, October 29, 2008 3:44 PM
To: Damon Michaels
Subject: [Bug c/37954] odd sized packed structures, under ARM, cause
lockup of application
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-10-29 19:44
-------
Do you have an example code that shows this? I almost want to say this
is
expected behavior.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
------------------------------------------------------------------------
----
Severity|blocker |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c/37954] odd sized packed structures, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
2008-10-29 19:44 ` [Bug c/37954] " pinskia at gcc dot gnu dot org
2008-10-29 19:49 ` damon dot michaels at navico dot com
@ 2008-10-29 19:52 ` damon dot michaels at navico dot com
2008-10-29 19:53 ` damon dot michaels at navico dot com
` (10 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: damon dot michaels at navico dot com @ 2008-10-29 19:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from damon dot michaels at navico dot com 2008-10-29 19:52 -------
Created an attachment (id=16580)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16580&action=view)
.c source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c/37954] odd sized packed structures, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (2 preceding siblings ...)
2008-10-29 19:52 ` damon dot michaels at navico dot com
@ 2008-10-29 19:53 ` damon dot michaels at navico dot com
2008-10-29 19:53 ` damon dot michaels at navico dot com
` (9 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: damon dot michaels at navico dot com @ 2008-10-29 19:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from damon dot michaels at navico dot com 2008-10-29 19:53 -------
Created an attachment (id=16582)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16582&action=view)
requested options
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c/37954] odd sized packed structures, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (3 preceding siblings ...)
2008-10-29 19:53 ` damon dot michaels at navico dot com
@ 2008-10-29 19:53 ` damon dot michaels at navico dot com
2009-10-21 9:36 ` [Bug target/37954] odd sized packed structures passed by value, " maurice35 dot david at laposte dot net
` (8 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: damon dot michaels at navico dot com @ 2008-10-29 19:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from damon dot michaels at navico dot com 2008-10-29 19:52 -------
Created an attachment (id=16581)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16581&action=view)
requested .ii file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (4 preceding siblings ...)
2008-10-29 19:53 ` damon dot michaels at navico dot com
@ 2009-10-21 9:36 ` maurice35 dot david at laposte dot net
2009-10-21 9:37 ` maurice35 dot david at laposte dot net
` (7 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: maurice35 dot david at laposte dot net @ 2009-10-21 9:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from maurice35 dot david at laposte dot net 2009-10-21 09:36 -------
Created an attachment (id=18854)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18854&action=view)
Screen shoot form lauterbach
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (5 preceding siblings ...)
2009-10-21 9:36 ` [Bug target/37954] odd sized packed structures passed by value, " maurice35 dot david at laposte dot net
@ 2009-10-21 9:37 ` maurice35 dot david at laposte dot net
2009-10-21 12:20 ` mikpe at it dot uu dot se
` (6 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: maurice35 dot david at laposte dot net @ 2009-10-21 9:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from maurice35 dot david at laposte dot net 2009-10-21 09:37 -------
It seems that I have a similar issue with ccmips compilator :
typedef struct
{
char A;
char B;
char C;
/*char padding;*/
} tStructABC;
typedef struct
{
tStructABC ABC1;
tStructABC ABC2;
} tStruct2ABC;
tStruct2ABC Struct2ABC;
int Compute(tStructABC ArgA,tStructABC ArgB)
{
return(ArgA.A+ArgA.B);
}
int main(int argc, char *argv[])
{
tStructABC * pABC1;
tStructABC * pABC2;
pABC1 = &(Struct2ABC.ABC1);
pABC2 = &(Struct2ABC.ABC2);
printf("Compute=%d\n",Compute(*pABC1,*pABC2));
}
This code crash with the printout:
Address load Exception
Exception Program Counter: 0x803f56f8
Status Register: 0x3000ff01
Cause Register: 0x00000010
Access Address : 0x80b8da83
Task: 0x80ffa440 "PGL_Main"
0x80ffa440 (PGL_Main): task 0x80ffa440 has had a failure and has been stopped.
0x80ffa440 (PGL_Main): fatal kernel task-level exception!
So The crash is due to an alignment issue on the address &(Struct2ABC.ABC2);.
To avoid this issue we need to add a padding byte in tStructABC because it
seems that there is no way to force a padding through a compilation option or
through a #pragma (as example #pragma pack(4)).
Please could you confirm this issue in compilation sw (ccmips) or not.
see: Created an attachment (id=18854)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18854&action=view) [edit]
Screen shoot form lauterbach
Best regard,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (6 preceding siblings ...)
2009-10-21 9:37 ` maurice35 dot david at laposte dot net
@ 2009-10-21 12:20 ` mikpe at it dot uu dot se
2009-10-21 14:47 ` maurice35 dot david at laposte dot net
` (5 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: mikpe at it dot uu dot se @ 2009-10-21 12:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from mikpe at it dot uu dot se 2009-10-21 12:19 -------
I can reproduce the misalignment exceptions on armv5tel-linux-gnueabi with
gcc-4.3.4 at -O0 but not with gcc-4.4.2. The loop in main() which iterates
over the packed array creates a misaligned pointer from which it performs
word-sized loads, which causes misalignment exceptions. gcc-4.4.2 generates
very different code which doesn't make assumptions about alignment.
--
mikpe at it dot uu dot se changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (7 preceding siblings ...)
2009-10-21 12:20 ` mikpe at it dot uu dot se
@ 2009-10-21 14:47 ` maurice35 dot david at laposte dot net
2009-10-21 19:47 ` mikpe at it dot uu dot se
` (4 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: maurice35 dot david at laposte dot net @ 2009-10-21 14:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from maurice35 dot david at laposte dot net 2009-10-21 14:46 -------
My version is:
[root@xxxx build]# ccmips -V
ccmips: `-V' option must have argument
[root@pace build]# ccmips --version
ccmips (GCC) 3.3.2 20030904 (Wind River vxworks61) (built 20050516)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
maurice35 dot david at laposte dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maurice35 dot david at
| |laposte dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (8 preceding siblings ...)
2009-10-21 14:47 ` maurice35 dot david at laposte dot net
@ 2009-10-21 19:47 ` mikpe at it dot uu dot se
2009-10-22 17:55 ` mikpe at it dot uu dot se
` (3 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: mikpe at it dot uu dot se @ 2009-10-21 19:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from mikpe at it dot uu dot se 2009-10-21 19:47 -------
(In reply to comment #9)
> My version is:
> [root@xxxx build]# ccmips -V
> ccmips: `-V' option must have argument
> [root@pace build]# ccmips --version
> ccmips (GCC) 3.3.2 20030904 (Wind River vxworks61) (built 20050516)
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
That's an old vendor-modified compiler based on an ancient and no longer
supported gcc version. Please direct your questions about that compiler to the
vendor, Wind River.
If you can reproduce your MIPS alignment problem using gcc-4.3 or newer, then
that's something you should report here in a new bugzilla entry (so as to not
confuse this ARM problem with a possibly unrelated MIPS problem).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (9 preceding siblings ...)
2009-10-21 19:47 ` mikpe at it dot uu dot se
@ 2009-10-22 17:55 ` mikpe at it dot uu dot se
2009-10-23 0:29 ` mikpe at it dot uu dot se
` (2 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: mikpe at it dot uu dot se @ 2009-10-22 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from mikpe at it dot uu dot se 2009-10-22 17:55 -------
Created an attachment (id=18869)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18869&action=view)
reduced test case in plain C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (10 preceding siblings ...)
2009-10-22 17:55 ` mikpe at it dot uu dot se
@ 2009-10-23 0:29 ` mikpe at it dot uu dot se
2009-10-23 12:49 ` mikpe at it dot uu dot se
2010-09-01 12:41 ` [Bug target/37954] [4.3 only] " ramana at gcc dot gnu dot org
13 siblings, 0 replies; 18+ messages in thread
From: mikpe at it dot uu dot se @ 2009-10-23 0:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from mikpe at it dot uu dot se 2009-10-23 00:29 -------
The ARM misalignment bug in this PR was fixed for gcc-4.4 by r141742, an
apparently ia64- and Ada-motivated generic patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (11 preceding siblings ...)
2009-10-23 0:29 ` mikpe at it dot uu dot se
@ 2009-10-23 12:49 ` mikpe at it dot uu dot se
2010-09-01 12:41 ` [Bug target/37954] [4.3 only] " ramana at gcc dot gnu dot org
13 siblings, 0 replies; 18+ messages in thread
From: mikpe at it dot uu dot se @ 2009-10-23 12:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from mikpe at it dot uu dot se 2009-10-23 12:49 -------
Created an attachment (id=18879)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18879&action=view)
backport of r141742 to gcc-4.3.4 that I'm testing
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/37954] [4.3 only] odd sized packed structures passed by value, under ARM, cause lockup of application
2008-10-29 19:43 [Bug c/37954] New: odd sized packed structures, under ARM, cause lockup of application damon dot michaels at navico dot com
` (12 preceding siblings ...)
2009-10-23 12:49 ` mikpe at it dot uu dot se
@ 2010-09-01 12:41 ` ramana at gcc dot gnu dot org
13 siblings, 0 replies; 18+ messages in thread
From: ramana at gcc dot gnu dot org @ 2010-09-01 12:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from ramana at gcc dot gnu dot org 2010-09-01 12:41 -------
Patches should be submitted to gcc-patches@gcc.gnu.org. This is a 4.3 only
issue.
--
ramana at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Known to fail| |4.3.1 4.3.5
Known to work| |4.4.2 4.5.0
Last reconfirmed|0000-00-00 00:00:00 |2010-09-01 12:41:33
date| |
Summary|odd sized packed structures |[4.3 only] odd sized packed
|passed by value, under ARM, |structures passed by value,
|cause lockup of application |under ARM, cause lockup of
| |application
Target Milestone|--- |4.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37954
^ permalink raw reply [flat|nested] 18+ messages in thread