[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192
From: |
hutchinsonandy |
Subject: |
Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192 |
Date: |
Wed, 16 Apr 2008 09:17:00 -0400 |
Indirect calls - ie simple function pointers are safe!
It is only when you try and do some arithmetic with them that there is
potential problem. The only reason to use arithmetic is for ASM related
manipulations. (but very useful!)
For example , (excuse syntax mistakes)
void foo(void) {}
(void * p1) (void);
p1 = &foo; //NO PROBLEM
p2= foo +2 ; //BROKEN
p3 =foo; //OK
P3 +=2; // BROKEN - indeterminate
My patched FIXED p1,p2 - but not P3.
-----Original Message-----
From: Dmitry K. <address@hidden>
To: address@hidden
Sent: Wed, 16 Apr 2008 2:13 am
Subject: Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192
On Wednesday 16 April 2008 14:02, Andy H wrote:
RFC
A problem has come up trying to fix function pointer arthmetic bugs.
[...]
(It is difficult to understand all quickly.)
A question: Is it safety to use common indirect call
of function with avr6 at present moment? It is interesting,
as indirect call is used in Avr-libc's EEPROM functions now.
I have try a small program. Seems, the result is wrong
(Binutils is 2.18, see avr-libc-dev discussion).
Thanks,
Dmitry.
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
- [avr-gcc-list] Re: Patch Fix PR35013, PR27192, Andy H, 2008/04/15
- Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192, Dave N6NZ, 2008/04/16
- Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192, Dmitry K., 2008/04/16
- Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192,
hutchinsonandy <=
- [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Weddington, Eric, 2008/04/16
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Andy H, 2008/04/16
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Dave N6NZ, 2008/04/16
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Andy H, 2008/04/18
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Dave N6NZ, 2008/04/19
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Andy H, 2008/04/19
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Wouter van Gulik, 2008/04/17
Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192, Wouter van Gulik, 2008/04/16