dl-load.c (ld.so) bug??

Troy Benjegerdes hozer at drgw.net
Tue Jun 22 08:52:13 EST 1999



testcase:

#include <stdio.h>
int main(void){
        char * ptr;
        printf("hello world\n");
        fflush(stdout);
        ptr = (char *)malloc(100);
        free(ptr);
}   


compile this with:
gcc test.c -lefence -g -static

On a PPC glibc-2.1 box, this segfaults in dl-load.c:564

On a x86 Red Hat 6.0 system, it works fine (
[troybenj at mos6 troybenj]$ ./a.out

  Electric Fence 2.0.5 Copyright (C) 1987-1998 Bruce Perens.
hello world
[troybenj at mos6 troybenj]$ 


Either dl-load.c has a serious bug, or ElectricFence is broken on PPC.
I suspect it's the former, and if so, this would explain the weird
segfaults I've been seeing.

Can someone that knows glibc better please confirm or deny this for me?

--------------------------------------------------------------------------
| Troy Benjegerdes    |       troy at microux.com     |    hozer at drgw.net   |
|    Unix is user friendly... You just have to be friendly to it first.  |
| This message composed with 100% free software.    http://www.gnu.org   |
--------------------------------------------------------------------------


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]





More information about the Linuxppc-dev mailing list