Hi, I thought I'd found a gcc compiler error (and still may have). The following program crashes with a segmentation fault.
#define N 209677 int main(int argv, char **argc) { int i; double a[N], b[N], c[N], d[N], e[N]; c[0]=0.0; i=1; c[i]=c[i-1]; } If I make N slightly less, or reduce the number of arrays defined, it runs fine. If I write instead "c[1]=c[0]" it runs fine. Basically, I simplified the original program as much as I could in ways which still caused the Seg Fault to happen. So I thought this must be a compiler error. The program was called "thick4.c". I used emacs to paste the file into a new buffer called "test.c". But this one worked fine when I compiled!!!! The two files "thick4.c" and "test.c" are identical, as both diff and cmp prove. The executables "thick4" and "test" differ very slightly however. -rwxrwxr-x 1 mark mark 4731 Mar 7 02:53 test* -rw-rw-r-- 1 mark mark 162 Mar 7 02:53 test.c -rwxrwxr-x 1 mark mark 4733 Mar 7 02:53 thick4* -rw-r--r-- 1 mark mark 162 Mar 7 02:51 thick4.c and $ cmp thick4 test thick4 test differ: char 3061, line 2 Why would identical files compile to slightly different executables? I have included gzipped versions of these executables with this email. Has anyone got any idea what might be going on? Or suggestions about what I could investigate next! Also, can anyone else replicate the error I got (using thick4.c as your file name). Thanks, Mark. -- _/~~~~~~~~\___/~~~~~~\____________________________________________________ ____/~~\_____/~~\__/~~\__________________________Mark_Phillips____________ ____/~~\_____/[EMAIL PROTECTED] ____/~~\HE___/~~\__/~~\APTAIN_____________________________________________ ____/~~\______/~~~~~~\____________________________________________________ __________________________________________________________________________ "They told me I was gullible ... and I believed them!"
thick4.gz
Description: Binary data
í¥: test åX[lTE³{ ´ÛÃF%DmZ^Ú¤\¤+Á@<lwO»kv÷lvÏêâ%¶H©éCSLÔhÄl¢>TJDã%Äh0* &D!®ß?3gÏìº$¾øä4³3ßüß?ÿÌæKû¶iÆÜäc~FèÒ½¶ å[óE{°y¬e«PFyuÊ5È:²ù:eÈ(/C}i2óåP&}V/ä¼m2äeó¤Üb ò)È(>)åºÌµè¤ö°^K9 Pdñ è½x*7²¶Ñ*ÚëåØzv<.}á%¿ì¿FÖuE¦Up+S?ò)øów ¯Fþøm;¿ þe#2Ãöèµd£-ñü%çÁLs(i§Ì¬Î8¦É0Mc#Q+c ų13á¤eÆS63{w§Ì\ÖF*R?§ÐRM§¯·³Ël5 7èO|?ûª^©>_Lò¸Ä/ãÌ£N q*á *á¼Çÿ\¸º¼¸ûÏÒçò¨ÏýA?ÏBcßg³¨ïFqÝ1ü·¸zQõÊ¥"Ò:ê9F²+ç9&1Ö@"¶üúäñ oì íµÃ§1~lOlº ×Î}Òõñññ¤-¬8:ãøç1ñRâÜÚÂ)÷ð/¯EQÛ¥_AQV<Ï[ YîòôÑÉâÂÙë±Zçzañ\ )#ѱèï³YQ~pJ(4ÎÞµOb¸\Ërîá«wýyõ;:³ñ=>ÏsGϺµàMê{4xóø1ý[j$Úèö½ck¿ä cÔpQ_tqmýè«ßÕ Ý9J_|¦9l¡ß¢S7ê//ÌÞ,<TÌ]ßçUß6Ãñãs?üU,ãçëDDÅóòûño(¿[N)²Óü#¢Mk¬>kqѸ¦XFIqB¹%ÁERo ìÆ2 ;4ú¬Ëy\1v;Åú¥z%Å^&KÌÄnC;jÓX~CÙtÄ/ëéêz0Ðíb} Õxà~£5ÐÚÔÚÚhê¶âáT  }´Ï¬ÿ?Ñ]×[æéÑÿºÙI'<ÒÉ2æÖâ)ìnif¤lÇ2::{ïuÂCÌ ³1fD¦ (J'áTÎxÚÊdãvª e¬1d;¢N8Ôs¿¼êXyü¢r;vÂèÿZ1±³2#âØ,EÁ»Ýp2Áp²hã?;´R0û·i óÎ#~þÊõì&÷,¹y¾äñsRgLîùF^<¹&ðîQä#Åb¼RWcÞùúñH<Ýi³UÆ×Ãøas»¹&Ø\»>×qJuÕ6jRy«^È'Vμ» á£½a¿OìºËËÉþiÉo]ÿ=§ð¦Àokò°Â£»×%ðö+¿{Ö¾¨ðh/lòÚ*vO0oìo¯îEÊ<ú&ü¾¥?Wò^Qxt&%ôò;[]áÑé¾ Ýw^¼ü-x§íáÃUæKù}éâñ{¡.î5 úaÞØöV\"ù~ ·²Êø>Wt(oµÒàV¿a"ÞÜ´ÍW±Û mºé+ð¾¯Â«¼sÖÖÑuZÄÿ&æÅÛþ¡ñ÷*ã«hÿ`\_°hXXn*aa!TÂÂ;Ó%,ì~qçñ*°ðL¨ÅJØ_Â8vJx!ÇS%¼ãK%,V0ÅÀ9Þ[ÂK8>0áâ¥'JXD[º8Îp#ÇÃ%,vØ©^.ìOºxE¾ÌÏ~~QñÊ ¼ª¯®ÀkÄ^Wpï&u|.ö*äw+ú:»V䧨"§7Ht½-eùk7Ê"ߥè½AÅôZ8HþRä#Ò+¹ü6öÊcöS ~£¬¿¥ì=æ} ߧÚ|êG¼ù|¬`êïJGÑ'{m#·¶wy÷XÿµùñýD±W¬2iÅ¿ó4o½4`½,ÕÊßÍ«+âxæÿF¬ÿ-Zùòæÿzô?¤yëö³°¿ë×±¼VþæÔ¼x`¾'5o>7+ú{WóÖÖÿ,pHª¿a/(ý×?'@?CH«;O:°¢ åËú,~µd¬4",mÜgkwhçn³¯·?w0i'Àmô¶Í¡=Nü¦esy´5·íîØ4;=½; Dw53K&2{à)+â--L¼E+ÝîduÐÎD,[EMAIL PROTECTED]'³ûÛ{»ª¿Ç·nõäæ`Ú=ÃL~÷¼Å³¿/Üh¸[ʺ|[EMAIL PROTECTED];;;úÌÛ¶õCf¨£³/Y©è?ÿÓ öQþo¿>^·{