Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!diamond!jdm5548 From: jdm5548@diamond.tamu.edu (James Darrell McCauley) Newsgroups: comp.lang.c Subject: data space address too high? Keywords: malloc, dbx, high address Message-ID: <7295@helios.TAMU.EDU> Date: 9 Aug 90 20:21:52 GMT Sender: usenet@helios.TAMU.EDU Reply-To: jdm5548@diamond.tamu.edu (James Darrell McCauley) Organization: Texas A&M University Agricultural Engineering Dept Lines: 62 NOTE: Probably another novice question. Those easily irritated should skip this message. Thank you all for the responses to my last question. [I learned that you don't ask questions unless you've had enough sleep to really think about your problem ;-)] This one (I don't think) is not as trivial as my last. Here's what I get from 'dbxtool' when I try to print the value of a variable at the point where my program crashes: =]Reading symbolic information... =]Read 2365 symbols =](dbxtool) print table[k] =]`fillab`fillab`table[`fillab`fillab`k] = 0x40a00000 =](dbxtool) print table[k][2] =]warning: core file read error: data space address too high =]bad data address =](dbxtool) Here's what I get when I print the address of array elements: =] (lots of stuff deleted) =]&table[15][3]=152048 =]&table[15][4]=152052 =]k = 16 =]&table[16][1]=1084227588 =]&table[16][2]=1084227592 =]&table[16][3]=1084227596 =]&table[16][4]=1084227600 <=== assignments begin to these addresses after this =]Bus error (core dumped) Could someone explain to me what this may mean? I assume it has something to do with extensive use (overuse) of malloc, but malloc didn't return any errors. Just a guess, but could I be allocating memory that's not accessible? I tried to isolate the problem in the infamous "test.c," but to no avail. I didn't think it appropriate to include all 1870 lines. THEREFORE, please don't flame for not including source. BTW, 'lint *c' doesn't mention anything unusual. Sun OS 4.0.3 on Sun 3/60 with 12 MB of memory. When including /usr/lib/debug/malloc.o & /usr/lib/debug/mallocmap.o at link time, I don't even get to the error described above. It complains: =]free: bad block size (1003204457) at 0x22d30 =] =]IOT trap (core dumped) I haven't tracked this one down yet. Something tells me that I'm going to have a heck of a time porting this to a PC (and it's only 30% complete) :-( Sorry for all the verbage. Please e-mail responses unless you think it would be more appropriate to post. Many thanks for your patience and suggestions. --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - James Darrell McCauley jdm5548@diamond.tamu.edu Dept of Ag. Engineering (409) 845-6484 Texas A&M University, College Station, Texas 77843-2117, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -