bugAVR C Runtime Library - Bugs: bug #14503, strnlen_P is wrong with classic...

 
 

bug #14503: strnlen_P is wrong with classic AVRs

Submitted by:  None
Submitted on:  Sun 11 Sep 2005 09:28:47 PM UTC  
 
Category: LibrarySeverity: 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.

 

Mon 26 Sep 2005 05:33:58 PM UTC, comment #1:

Fixed 2005-09-26.

Thanks Dmitry.

Anatoly Sokolov <aesok>
Project Administrator
Sun 11 Sep 2005 09:28:47 PM UTC, original submission:

strnlen_P is not work correctly for classic AVR-s. The reason
is next: macro 'LPM_R0_ZP' inserts 'adiw' instruction, which destroyed
a 'C' flag.
Next program illustrates an error, if compiled for AT90S8515
chip:

#include <avr/pgmspace.h>
_attribute_((progmem)) char s[] = "12345";
int main ()
{
return (strnlen_P(s,1) == 1) ? 0 : 1;
}

It is possible to correct this error by moving LPM_R0_ZP before
the subi/sbci pair. Patch is present.

Dmitry.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #3250:  strnlen_P.patch added by None (325B - text/x-diff - Patch for 'strnlen_P.S' .)

 

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 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 26 Sep 2005 05:33:58 PM UTCaesokStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Sun 11 Sep 2005 09:28:48 PM UTCNoneAttached File-=>Added strnlen_P.patch, #2943
  Carbon-Copy-=>Added dmixm --СБК-- marine --ТЧК-- febras --ТЧК-- ru

Back to the top


Powered by Savane 3.1-cleanup1