Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
2004-10-04  Ulrich Drepper  <drepper@redhat.com>

	* malloc/mtrace.pl: Avoid calling location unless it is needed for
	output.  Patch by Edward Bishop <binutils@gmail.com>.

	* nscd/Makefile (CFLAGS-gai.c): Add -fpie.
  • Loading branch information
Ulrich Drepper committed Oct 4, 2004
1 parent 92e2bb2 commit e582c5e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2004-10-04 Ulrich Drepper <drepper@redhat.com>

* malloc/mtrace.pl: Avoid calling location unless it is needed for
output. Patch by Edward Bishop <binutils@gmail.com>.

* nscd/Makefile (CFLAGS-gai.c): Add -fpie.

2004-10-04 H.J. Lu <hongjiu.lu@intel.com>

* sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
Expand Down
15 changes: 8 additions & 7 deletions malloc/mtrace.pl
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,18 @@ sub location {
if ($cols[$n] eq "+") {
if (defined $allocated{$allocaddr}) {
printf ("+ %#0@XXX@x Alloc %d duplicate: %s %s\n",
hex($allocaddr), $nr, $wherewas{$allocaddr}, $where);
hex($allocaddr), $nr, &location($addrwas{$allocaddr}),
$where);
} else {
$allocated{$allocaddr}=$howmuch;
$wherewas{$allocaddr}=&location($where);
$addrwas{$allocaddr}=$where;
}
last SWITCH;
}
if ($cols[$n] eq "-") {
if (defined $allocated{$allocaddr}) {
undef $allocated{$allocaddr};
undef $wherewas{$allocaddr};
undef $addrwas{$allocaddr};
} else {
printf ("- %#0@XXX@x Free %d was never alloc'd %s\n",
hex($allocaddr), $nr, &location($where));
Expand All @@ -185,7 +186,7 @@ sub location {
if ($cols[$n] eq "<") {
if (defined $allocated{$allocaddr}) {
undef $allocated{$allocaddr};
undef $wherewas{$allocaddr};
undef $addrwas{$allocaddr};
} else {
printf ("- %#0@XXX@x Realloc %d was never alloc'd %s\n",
hex($allocaddr), $nr, &location($where));
Expand All @@ -196,10 +197,10 @@ sub location {
if (defined $allocated{$allocaddr}) {
printf ("+ %#0@XXX@x Realloc %d duplicate: %#010x %s %s\n",
hex($allocaddr), $nr, $allocated{$allocaddr},
$wherewas{$allocaddr}, &location($where));
&location($addrwas{$allocaddr}), &location($where));
} else {
$allocated{$allocaddr}=$howmuch;
$wherewas{$allocaddr}=&location($where);
$addrwas{$allocaddr}=$where;
}
last SWITCH;
}
Expand Down Expand Up @@ -227,7 +228,7 @@ sub location {
$anything=1;
}
printf ("%#0@XXX@x %#8x at %s\n", hex($addr), $allocated{$addr},
$wherewas{$addr});
&location($addrwas{$addr}));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions nscd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ CFLAGS-nscd_setup_thread.c += -fpie
CFLAGS-aicache.c += -fpie
CFLAGS-selinux.c += -fpie
CFLAGS-initgrcache.c += -fpie
CFLAGS-gai.c += -fpie

$(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
$(LINK.o) -pie -Wl,-O1 \
Expand Down

0 comments on commit e582c5e

Please sign in to comment.