From: SourceForge.net <no...@so...> - 2005-07-22 16:09:51
|
Bugs item #1115667, was opened at 2005-02-03 19:35 Message generated for change (Comment added) made by tecodev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1115667&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: pic14 target >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: acid77 (acid77) >Assigned to: Raphael Neider (tecodev) Summary: crash: SIGSEGV Initial Comment: the following program causes a crash ---cut--- #include "p16f876.h" void main(void) { const char s[4] = { 1, 2, 3, 4 }; char i; for(i = 0; i < 4; i++) { char x = s[i]; PORTC = x; } } ---cut--- # sdcc -v SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51 /ds400/hc08 2.4.0 (Feb 3 2005) (UNIX) # sdcc -S -V -mpic14 -p16f84 -mplab-comp test2.c Processor: 16f84 + "sdcpp" -nostdinc -Wall -std=c99 -DSDCC=1 - DSDCC_MODEL_SMALL -DSDCC_pic14 -D__pic14 - I"/usr/local/share/sdcc/include" "test2.c" Caught signal 11: SIGSEGV ---------------------------------------------------------------------- >Comment By: Raphael Neider (tecodev) Date: 2005-07-22 16:09 Message: Logged In: YES user_id=1115835 Fixed with local s[] in SDCC 2.5.1 #1064. ---------------------------------------------------------------------- Comment By: Raphael Neider (tecodev) Date: 2005-07-01 02:25 Message: Logged In: YES user_id=1115835 This now will compile after making the array const char s[4] = { 1, 2, 3, 4 }; global (complex-typed locals seem still to be broken). It crashed because of a bug in genarith.c:genAdd (index out-of-bounds), fixed in SDCC 2.5.1 #1053. ---------------------------------------------------------------------- Comment By: Borut Razem (borutr) Date: 2005-04-11 16:47 Message: Logged In: YES user_id=568035 Tested with MINGW sdcc version 2.4.8 #1004 on Windows XP and it doesn't crash. ---------------------------------------------------------------------- Comment By: Borut Razem (borutr) Date: 2005-04-10 19:01 Message: Logged In: YES user_id=568035 I tried it with MINGW sdcc version 2.4.8 #1001 on Windows 2000 and it doesn't crash. ---------------------------------------------------------------------- Comment By: Hubert Sack (hsack) Date: 2005-04-04 13:24 Message: Logged In: YES user_id=1160854 Try with current version. My be it's solved in 2.4.8 #987 (see changelog). I got the signal 11 too and detected a memory allocation problem, which was solved by erik ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1115667&group_id=599 |