finding segfaults

Andrew Tridgell tridge at samba.anu.edu.au
Fri Aug 21 08:20:08 GMT 1998


Samba has the annoying property that segfaults often go
unnoticed. This is because clients so often auto-reconnect so there is
no sign of a segfault except for a log entry that noone ever looks at.

Samba developers need to be on the lookout for segafults so we can fix
them. I'd encourage all developers (an anyone else interested) to look
at what is done if you compile with -DAJT=1. You'll see that Smaba
then calls a xedit on the servers display as soon as a segfault
happens, and keeps the process around (so you can attach with a
debugger) until you kill the xedit.

I have fixed numerous otherwise undetected segfaults by having a xedit
window pop up on my display to tell me when something goes
wrong. You'll need to customise it for your environment, but please do
take the time to setup a system where you detect segfaults
immediately. Test it by adding some dodgy code (*(int *)0 = 1; should
do the trick).



More information about the samba-technical mailing list