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".

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.