From: SourceForge.net <no...@so...> - 2010-11-29 19:10:44
|
Bugs item #3122620, was opened at 2010-11-29 19:10 Message generated for change (Tracker Item Submitted) made by woody1234 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3122620&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: Woody (woody1234) Assigned to: Nobody/Anonymous (nobody) Summary: Generated incorrect result 2 Initial Comment: Command line to compile: C:\sdcc\bugs\sips>..\..\bin\sdcc sips.c -mz80 -c --codeseg CODE5 I am testing snapshot build 6069 downloaded directly C:\sdcc\bugs\sips>..\..\bin\sdcc -v SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.1 #6069 (Nov 29 2010) (MINGW32) This problem is complicated so I attached the whole sips.c and all include files needed. In sips.c line 2078 to 2082 if (Sip_pCurLcb->pReqUri) free(Sip_pCurLcb->pReqUri); Sip_pCurLcb->pReqUri = heap_save_str(pBuf); if (Sip_pCurLcb->pInvUri) free(Sip_pCurLcb->pInvUri); Sip_pCurLcb->pInvUri = heap_save_str(pBuf); both Sip_pCurLcb->pInvUri and Sip_pCurLcb->pReqUri will be incorrectly set to 0 in real run. However, if rearrange them to: if (Sip_pCurLcb->pReqUri) free(Sip_pCurLcb->pReqUri); if (Sip_pCurLcb->pInvUri) free(Sip_pCurLcb->pInvUri); Sip_pCurLcb->pReqUri = heap_save_str(pBuf); Sip_pCurLcb->pInvUri = heap_save_str(pBuf); We can get correct none-zero pointers. I am attaching sips_2.zip which used in 6069 test. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3122620&group_id=599 |