cygwin 에서 mpatrol 사용

cygwin 에 mpatrol-1.4.8 을 설치하였습니다.
manual 대로 test 를 돌려보려는데, 잘 안되는군요.
혹여 cygwin 에서 mpatrol 을 적용해 보신분 계시면 조언 부탁드립니다.
malloc 호출에 관한 test 인데, stackdump error 가 발생합니다.
gdb 로 따라가 보면, __mp_alloc 호출에서 recursion 이 발생하는 것
같습니다. 원인을 알 수 없고, 설치를 잘못한건지 모르겠습니다.
cygwin 에 설치는 auto-build tool(autoconf, automake etc..) 을
사용하여 build 하였습니다.
---- test file ------
#include
int main(void)
{
char* p;
p = (char*)malloc(10);
printf("0x%x\n", p);
return 0;
}
------ gdb -nw a.exe -------
$ gdb -nw a.exe
GNU gdb 2002-07-19-cvs (cygwin-special)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) b main
Breakpoint 1 at 0x4010d0 file test.c, line 8.
(gdb) run
Starting program /project/tmp/a.exe
Program received signal SIGSEGV, Segmentation fault.
__mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0, u=0, g=0x0, h=0,
k=1)
at mpalloc.c334
334 checkalloca(&l);
(gdb) bt
#0 __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0, u=0, g=0x0,
h=0, k=1)
at mpalloc.c334
#1 0x00402431 in malloc (l=16) at malloc.c57
#2 0x00401523 in __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0,
u=0,
g=0x0, h=0, k=1) at mpalloc.c340
#3 0x00402431 in malloc (l=16) at malloc.c57
#4 0x00401523 in __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0,
u=0,
g=0x0, h=0, k=1) at mpalloc.c340
#5 0x00402431 in malloc (l=16) at malloc.c57
#6 0x00401523 in __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0,
u=0,
g=0x0, h=0, k=1) at mpalloc.c340
#7 0x00402431 in malloc (l=16) at malloc.c57
#8 0x00401523 in __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0,
u=0,
g=0x0, h=0, k=1) at mpalloc.c340
#9 0x00402431 in malloc (l=16) at malloc.c57
#10 0x00401523 in __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0,
u=0,
g=0x0, h=0, k=1) at mpalloc.c340
#11 0x00402431 in malloc (l=16) at malloc.c57
#12 0x00401523 in __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0,
u=0,
g=0x0, h=0, k=1) at mpalloc.c340
#13 0x00402431 in malloc (l=16) at malloc.c57
#14 0x00401523 in __mp_alloc (l=16, a=0, f=AT_MALLOC, s=0x0, t=0x0,
u=0,
g=0x0, h=0, k=1) at mpalloc.c340
#15 0x00402431 in malloc (l=16) at malloc.c57
---Type to continue, or q to quit---
----- system info --------
$ uname -a
CYGWIN_NT-5.0 CKLEE 1.3.10(0.51/3/2) 2002-02-25 1114 i686 unknown
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with /netrel/src/gcc-3.2-1/configure --enable-
languages=c,c++,f77,java --enable-libgcj -
-enable-threads=posix --with-system-zlib --enable-nls --without-
included-gettext --enable-interprete
r --disable-sjlj-exceptions --disable-version-specific-runtime-libs -
-enable-shared --build=i686-pc-
linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --
prefix=/usr --exec-prefix=/usr
--sysconfdir=/etc --libdir=/usr/lib --
includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model posix
gcc version 3.2 20020818 (prerelease)
$ gdb -v
GNU gdb 2002-07-19-cvs (cygwin-special)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin".
댓글 달기