Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Alpha gcc
       [not found] <Pine.LNX.3.91.961202150024.25169B-100000@alfa.danmar.goldsword.com>
@ 1996-12-02 19:14 ` Jim Nance
  1996-12-03  7:03 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Jim Nance @ 1996-12-02 19:14 UTC (permalink / raw)


> I was working on a program on an AXP using gcc, I defined a vector 
> float dA[NMAX] and NMAX was defined in the header file. I inadvertantly 
> ran the index of dA to NMAX + 1 . The program compiled and ran. I took 
> the same program and placed it on an intel linux with gcc and I got the 
> expected core dump. Why doesn't the above cause a core dump on the AXP? I 
> know it is poor programming, but I am curious as to why it works one way 
> on one machine but not on the other. Thanks. 

You only get a core dump if you happen to access an address that is on a
page that is not mapped into your processes address space.  On the intel
dA[NMAX] apparently ends at a page boundary.  On the alpha it does not.
There are many reasons this could be true.  One is that the alpha has 8K
pages while the intel has 4K pages (does NMAX happen to be 1024?).  If you
overrun the address by enough, you will get a core dump.

Jim

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Alpha gcc
  1996-12-02 18:50 gdb doesn't seem to understand my shared library David Mosberger-Tang
@ 1996-12-02 20:08 ` D. Steven Daniel
  0 siblings, 0 replies; 3+ messages in thread
From: D. Steven Daniel @ 1996-12-02 20:08 UTC (permalink / raw)


I was working on a program on an AXP using gcc, I defined a vector 
float dA[NMAX] and NMAX was defined in the header file. I inadvertantly 
ran the index of dA to NMAX + 1 . The program compiled and ran. I took 
the same program and placed it on an intel linux with gcc and I got the 
expected core dump. Why doesn't the above cause a core dump on the AXP? I 
know it is poor programming, but I am curious as to why it works one way 
on one machine but not on the other. Thanks. 

********************************************************************
*  D. Steven Daniel						   *
* Commercial account danields@goldsword.com			   *
* Academic account daniel@microsys6.engr.utk.edu		   *
********************************************************************

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Alpha gcc
       [not found] <Pine.LNX.3.91.961202150024.25169B-100000@alfa.danmar.goldsword.com>
  1996-12-02 19:14 ` Alpha gcc Jim Nance
@ 1996-12-03  7:03 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 1996-12-03  7:03 UTC (permalink / raw)


> but I am curious as to why it works one way 
> on one machine but not on the other. Thanks. 

An accident of variable layout and page alignment, is all; the same
can happen on i386.  You certainly will get a fault if you send your
index too far.

r~

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-12-03  7:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.3.91.961202150024.25169B-100000@alfa.danmar.goldsword.com>
1996-12-02 19:14 ` Alpha gcc Jim Nance
1996-12-03  7:03 ` Richard Henderson
1996-12-02 18:50 gdb doesn't seem to understand my shared library David Mosberger-Tang
1996-12-02 20:08 ` Alpha gcc D. Steven Daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox