bugAVR C Runtime Library - Bugs: bug #16434, EMPTY_INTERRUPT has no misspelled...

 
 

bug #16434: EMPTY_INTERRUPT has no misspelled vector checking

Submitted by:  None
Submitted on:  Tue 25 Apr 2006 01:21:09 AM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPercent Complete: 0%
Assigned to: NoneOriginator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 25 Apr 2006 01:21:09 AM UTC, original submission:

The macro EMPTY_INTERRUPT, supplied via the AVRLibC interrupt.h header, does not check the passed vector name to see if it is misspelled.

This can be fixed via the addition of the signal attribute to the existing naked attribute; when used in conjunction no prologue/epilogue code is generated due to the naked attribute, but the vector name is still checked due to the signal attribute.

Proposed Fix: Change the following block from interrupt.h:

#ifdef __cplusplus
#define EMPTY_INTERRUPT(vector) \
extern "C" void vector(void) _attribute_ ((naked)); \
void vector (void) { _asm_ __volatile__ ("reti" ::); }
#else
#define EMPTY_INTERRUPT(vector) \
void vector (void) _attribute_ ((naked)); \
void vector (void) { _asm_ __volatile__ ("reti" ::); }
#endif

Into:

#ifdef __cplusplus
#define EMPTY_INTERRUPT(vector) \
extern "C" void vector(void) _attribute_ ((signal, naked)); \
void vector (void) { _asm_ __volatile__ ("reti" ::); }
#else
#define EMPTY_INTERRUPT(vector) \
void vector (void) _attribute_ ((signal, naked)); \
void vector (void) { _asm_ __volatile__ ("reti" ::); }
#endif

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 24 Jun 2006 05:30:51 PM UTCaesokStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1