From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199707131822.LAA23165@panda.mosberger> Date: Mon, 14 Jul 97 00:47:44 CDT From: wsb@VNET.IBM.COM Subject: malloc() problems I'm hoping someone out there has seen the following problem. I have a reasonably large C code I'm trying to get running on a PC164 system with RedHat 4.2 installed and kernel 2.0.30, also from the 4.2 CD. Some of the various binaries compile and run fine. Others, abort and in turn can cause gdb to abort when they attempt to issue malloc()'s. There are also some kernel messages indicating an unaligned access: zm31mig(1382): unaligned trap at 0000000000000025: 000000012013b10c 29 1 zm31mig(1382): unaligned trap at 0000000000000025: 000000012013b10c 29 3 zm31mig(1382): unaligned trap at 0000000000000025: 007967669313b10c 29 2 What's odd is that sometimes, on the same binary, I get only the first error. Other times I get all three. From looking at the kernel source, the message is saying the program counter is at 0...25, the va?? is at 000000012013b10c, the instruction is 29 (load quadword) into register 1. I guess a quadword must align to a 16 byte boundary and that address is not on a 16 byte boundary so the message is valid. My main concern is understanding where that address of 0...25 came from. It doesn't seem like a normal address to me. That leads me to believe the address of malloc() was somehow screwed up. How do I determine what happened to the function address? If I step the program thru to just before the error that takes gdb and my binary down, what should I try to look at? I did try to ask 'whatis malloc' and that also crashes gdb so anything that touches malloc() causes the problem. Note this problem would seem to be similar to a previous one where a programmer was attempting to malloc() several arrays and it kept crashing on that code too. I saw that a couple weeks ago but do not remember anyone posting an answer. Any advice is appreciated. Wes (wsb@vnet.ibm.com) -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com