Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: wsb@VNET.IBM.COM <wsb@VNET.IBM.COM>
Subject: malloc() problems
Date: Mon, 14 Jul 97 00:47:44 CDT	[thread overview]
Message-ID: <dce15547b3288b77d9687b5e2172a01c.axp-list@archive.invalid> (raw)

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

             reply	other threads:[~1997-07-14  5:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-14  5:47 wsb [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-07-14 12:20 malloc() problems Greg Lindahl
1997-07-14 17:09 Michal Jaegermann
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox