ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] sparc segfault on startup with version 1.4.0


From: Michael Graham
Subject: Re: [RP] sparc segfault on startup with version 1.4.0
Date: Thu, 27 Apr 2006 12:01:42 +0100

> I've tried this with no success. But I have made some progress in
> tracking down the bug. Solaris doesn't like printing null strings
> printf("%s\n",NULL) will cause it to crash. Unfortunately finding all
> of the places in ratpoison where this happens isn't going to be easy.

OK think I have a working patch that does

if ( blah == NULL )
print("NULL")
else
print("%s",blah)

for each of the debugging lines, but as I've said before I'm no c
programmer so it might not be the greatest code you've ever seen.

> As I said in my original message it crashed randomly when I was using
> the normal build and on startup with --enable-debug. This printf
> problem certainly explains why --enable-debug causes it to crash
> earlier but does it explain the original causes for crashing? Would
> you code ever print without debuging on?

With the above patch I'm now getting what I think is my original bug.
Switching to a workspace that doesn't exist causes a crash. I presume
this happens whenever I try a command that isn't bound to anything but
in this case I'm doing C-t F7 to switch to the none existant workspace
7.

Here is the backtrace:

#0  0xff0b3218 in strlen () from /usr/lib/libc.so.1
#1  0xff1065a0 in _doprnt () from /usr/lib/libc.so.1
#2  0xff1089a8 in vsnprintf () from /usr/lib/libc.so.1
#3  0x35d04 in xvsprintf (fmt=0x41d80 "%s", ap=0xffbee37c) at main.c:122
#4  0x19690 in cmdret_new (success=1, fmt=0x41d80 "%s") at actions.c:753
#5  0x220f8 in cmd_getenv (interactive=0, args=0x6e6c0) at actions.c:3752
#6  0x1df4c in command (interactive=0, data=0x6ce61 "getenv fspl6")
    at actions.c:2409
#7  0x2c2f0 in execute_remote_command (w=41943041) at events.c:517
#8  0x2c498 in receive_command (root=37) at events.c:582
#9  0x2c6d0 in property_notify (ev=0x563b8) at events.c:613
#10 0x2d26c in delegate_event (ev=0x563b8) at events.c:842
#11 0x2dbb8 in listen_for_events () at events.c:1010
#12 0x375cc in main (argc=1, argv=0xffbee8c4) at main.c:697

Again you see that strlen is where the sigfault is so I suspect that
the code is playing around with NULL strings but I'm not yet sure
which of the strings in vsnprintf is NULL. I'll keep playing around.

--
Michael Graham <address@hidden>

Attachment: rat-solaris.patch
Description: Binary data


reply via email to

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