I just installed the new RedHat 7.1. It comes with
gcc --version 2.96 . I'm trying to build a big integer
program, and I'm trying to malloc in order to build a
linked list containing ints. I get a core-dump, and
stepping through with gdb (GNU 5.0rh-5 Red Hat Linux 7.1),
I get
(gdb) s
__libc_malloc (bytes=12) at malloc.c:2697
2697 malloc.c: No such file or directory.
in malloc.c
(gdb)
rpm -qf /usr/include/stdlib.h gets
glibc-devel-2.2.2-10
Would someone please let me know what I need to do to
get past this ??
Thanx;
john
Seattle
--
"I think the average seventy year old american
is in greater danger of suffering physical
damage because she can't afford prescription
drugs than she is of being hit with a foreign
missile."
-- Congressman Barney Frank
Wednesday 17 March 1999
That refers to the `development' package, i.e. the headers from glibc.
What you would need to do is install the sources for glibc to be able to
step through the code.
The sources should be in some package or another -- if not, go to a GNU
mirror and get the appropriate source.
>
> Would someone please let me know what I need to do to
> get past this ??
>
The bad news, is that SIGSEGVs in malloc() are usually not traceable
this way at all, as the crash usually occurs long after the bug in the
program (you've most likely overrun a buffer somewhere or deleted
something twice -- messing up the allocators internal metadata.
HTH,
--ag
--
Artie Gold, Austin, TX (finger the cs.utexas.edu account for more info)
mailto:ag...@bga.com or mailto:ag...@cs.utexas.edu
--
He looked like hell, but the devil was smiling.
rpmverify -l tells me that
package glibc-2.2.2-10.i386 is not installed
and the same for the i686 package, but trying to
install/upgrade with rpm -Uvh tells me
package glibc-2.2.2-10 is already installed
and when I do that for the i686 package, I get
many screenfuls of conflict reports of files
that live in /usr/lib/gconv/ , and all those
files came from glibc-2.2.2-10, according to
rpm -qf . rpm -qa shows that I've got
glibc-2.2.2-10
glibc-common-2.2.2-10
glibc-devel-2.2.2-10
glibc-profile-2.2.2-10
all in. There's a
/usr/i386-glibc21-linux/include/malloc.h which
came from compat-glibc-6.2-2.1.3.2 , but gdb
actually complained about malloc.c .
I dunno. Thank you again for your help;
john
Seattle
--
"Arthur H. Gold" wrote:
> John H West wrote:
<snip>
I couldn't get glibc to reinstall (yeah, I could've
pushed, but the RH Manual's RPM section warns about
breaking things), so I trashed the OS partitions
and tried reinstalling from RH 4.2, 5.0, 5.1, 5.2,
all of which gave me some error about "Fatal error
cannot open RPM database.", followed by errors
about couldn't unmount something. These installed
fine a few years ago.
So, I started to install Mandrake 8.0, which
slightly predates RH 7.1 in version numbers.
Therein, I read that "glibc-devel" has _different_
glibc components that does vanilla glibc. I
installed without the "devel" package, and now I
can malloc again. Now I'm getting the _real_
SIGSEGVs that I'd been longing for !!
Still, it seems odd that _any_ glibc wouldn't
malloc, and _especially_ one that _developers_
are working on.
john
Seattle
--