This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running testsuite with /proc/sys/kernel/core_uses_pid set, avoiding leaving core dump files behind

On Wed, 07 Sep 2011 18:18:38 +0200, Pedro Alves wrote:
> I now only end up with a single unexpected core dump after a
> testrun, generated by the typeddwarf binary of typeddwarf.exp
> (a SIGSEGV).  I'm not sure what's going on here.  Looking at
> the .c file, there doesn't seem to be anything that should crash.

It is linked from .exp with -nostdlib, therefore there is no _exit syscall but
ret, jumping into a garbage.

> What I find strange is that the typeddwarf-amd64.S
> file claims to be generated by
>   "gcc -S -g -O2 typeddwarf.c -o typeddwarf-amd64.S"
> but typeddwarf-amd64.S doesn't contain a main label, it
> has a _start label instead, so it looks like it got hand
> massaged a bit.

I agree.

> Indeed, if I compile typeddwarf.c
> directly, I get a binary that does not crash.

As you did not use -nostdlib:
if { [prepare_for_testing "${test}.exp" "${test}" ${sfile} {nodebug additional_flags=-nostdlib}] } {

The reason for -nostdlib is:
	Re: Regression: Re: RFC: implement typed DWARF stack
to be able to run it with -m32 even on system without 32-bit devel libraries

Still I do not get any core file from this testcase, either with linux-nat or
with gdbserver, in both cases the program gets properly killed before it


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]