monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] monotone with argp


From: Matthew A. Nicholson
Subject: Re: [Monotone-devel] monotone with argp
Date: Tue, 25 Jan 2005 23:00:46 -0600
User-agent: Debian Thunderbird 1.0 (X11/20050116)

Badai Aqrandista wrote:
Hi,

i've run 'make check' on my changes and it fails in a spot where monotone should've checked for invalid options... i've fixed this...

From: Nathaniel Smith <address@hidden>

[...snip...]

To figure out where a segfault is coming from:
  $ gdb monotone
  (gdb) set args <args you want to pass to monotone, e.g. --help>


now i'm trying to figure out what causes segfault when i use the argp option to show the list of available options (ARGP_HELP_LONG)... i've used gdb to debug it but apparently the segfault happen in libc... i'm using glibc 2.3.2 on debian unstable...

i'm sorry if this is the wrong list to ask, but i don't know where else to ask...

thanks

this is my gdb session:
(gdb) run
Starting program: /home/cipi/hack/monotone/monotone-cp/monotone
[Thread debugging using libthread_db enabled]
[New Thread 1076803168 (LWP 12891)]
Usage: /home/cipi/hack/monotone/monotone-cp/monotone [OPTION...]
           command [ARGS...]


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1076803168 (LWP 12891)]
0x4028347a in argp_failure () from /lib/tls/libc.so.6
(gdb) bt
#0  0x4028347a in argp_failure () from /lib/tls/libc.so.6
#1  0x40282415 in argp_failure () from /lib/tls/libc.so.6
#2  0x40281205 in argp_failure () from /lib/tls/libc.so.6
#3  0x40280a5c in argp_help () from /lib/tls/libc.so.6
#4  0x08213767 in cpp_main (argc=1, argv=0xbffff9e4) at monotone.cc:303
#5 0x08214cf1 in main_with_signal_handlers (argc=1, argv=0xbffff9e4) at main.cc:283 #6 0x08214e63 in main_with_many_flavours_of_exception (argc=1, argv=0xbffff9e4) at main.cc:337
#7  0x08215511 in main (argc=1, argv=0xbffff9e4) at main.cc:457
(gdb)


and this is the result of strace:
futex(0x4015e4b4, FUTEX_WAKE, 2147483647) = 0
futex(0x401a09ec, FUTEX_WAKE, 2147483647) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40442000 write(1, "Usage: ./monotone [OPTION...] co"..., 48Usage: ./monotone [OPTION...] command [ARGS...]
) = 48
write(1, "\n", 1
)                       = 1
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGFPE, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGTRAP, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGSEGV, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGBUS, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGABRT, {SIG_DFL}, NULL, 8) = 0
write(2, "monotone: fatal: signal: memory "..., 49monotone: fatal: signal: memory access violation
) = 49
write(2, "monotone: this is almost certain"..., 54monotone: this is almost certainly a bug in monotone.
) = 54
write(2, "monotone: please send this error"..., 83monotone: please send this error message, the output of 'monotone --full-version',
) = 83
write(2, "monotone: and a description of w"..., 81monotone: and a description of what you were doing to address@hidden
) = 81
write(1, "      ", 6      )                   = 6
munmap(0x40442000, 4096)                = 0
exit_group(1)                           = ?


regards,
badai


It's hapening in cpp_main(). You are probably passing some bad data some where (null pointer), you can examine the data with additional gdb commands.


--
Matthew A. Nicholson
Matt-land.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]