[SWLUG] how hard can it be... to get a core dump

Justin Mitchell justin at discordia.org.uk
Thu Sep 25 12:01:43 UTC 2008


On Thu, 2008-09-25 at 12:28 +0100, Mark Summerfield wrote:
> On 2008-09-25, Dave Cridland wrote:
> > On Thu Sep 25 08:16:19 2008, Mark Summerfield wrote:
> > > and even if I use sysctl with -e I still end up with
> > >
> > >     $ cat /proc/sys/fs/suid_dumpable
> > >
> > > printing 0.
> >
> > Ah... If it's a setuid program, we found it easiest to do it within
> > the source:
> 
> It isn't a setuid program so there's no setuid() call... I just found a
> list of instructions for making core dumps happen and followed them, and
> the last one was to execute syctl, but I've no idea why or what it was
> supposed to do.

well typical behaviour is just the 'ulimit -c unlimited'
which reverses any previous limit the distro set on core dumps
that should just let the program dump core in the directory it was
running in.

the other stuff looked to be restraining where core dumps would be put,
and allowing for otherwise not allowed core dumps for setuid programs.


the other way of course is to not core dump at all, but run the program
from within gdb, so it drops straight to the debugger when it crashes.

'gdb ./myprogram'
then 'run' followed by any command line args your program needs






More information about the Swlug mailing list