From: SourceForge.net <no...@so...> - 2007-10-23 21:25:58
|
Bugs item #1818857, was opened at 2007-10-23 23:25 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1818857&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Wojciech Zabolotny (wzab) Assigned to: Nobody/Anonymous (nobody) Summary: Incorrect use of the iTemp variables? Initial Comment: I have a strange problem with my code. It is an USB firmware based on the PUF written by Pierre Gaufillet. I have attached the zip file with the minimal portions of the source code needed to reproduce the problem. To compile it, you should run the ". build" command. If you then inspect the ep1.lst file, you will see the following: iTemp0 res 1 udata_ep1_1 udata iTemp9 res 1 udata_ep1_2 udata iTemp25 res 1 [...] ; .line 16; ep1.c if(EP_OUT_BD(1).Cnt >= 1) MOVFF (_ep_bdt + 9), (iTemp0 + 1) [...] ; .line 23; ep1.c if(EP_OUT_BD(1).Cnt < 3) { MOVFF (_ep_bdt + 9), (iTemp9 + 1) [...] ; .line 27; ep1.c if(EP_OUT_BD(1).Cnt != 2+((len+3)>>2)) { MOVFF (_ep_bdt + 9), (iTemp25 + 1) So even though the iTemp variables are reserved correctly, they are later used incorrectly. The next byte (iTemp?? + 1) is used instead of the reserved one. It results with the overwritng of the first variable located after the last iTemp?? variable... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1818857&group_id=599 |