This is the mail archive of the mailing list for the elfutils 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: [PATCH] stack: Add new '-n MAXFRAMES' option. Resolve addresses after unwind.

On Fri, Jan 03, 2014 at 10:30:11PM +0100, Jan Kratochvil wrote:
> On Thu, 02 Jan 2014 23:52:05 +0100, Mark Wielaard wrote:
> > I don't agree with the infinite default, there should be a limit by
> > default, but I agree with everything else.
> I have realized you are right there is needed:
> 	[patch] Detect infinite backtraces

I haven't read the patch yet, but it does look like a nice addition
independent of any -n default for eu-stack.

> Even 2048 is not enough.  Why should I have to use:
> $ ./src/stack -n 999999 -e ./a.out --core ./core.*|tail

BTW. If you don't want any limit then use -n 0.

> [...]
> #523820 0x00000000004004fe float
> #523821 0x00000000004004fe float
> #523822 0x000000000040050e main
> #523823 0x000000305f821d65 __libc_start_main
> #523824 0x0000000000400429 _start
> $ _
> This is a perfectly valid backtrace, I do not see why I should specify an
> extra option to get valid backtrace.

It is a valid backtrace, but it isn't a good idea to output half a million
lines by default. If you really want hunderds of thousands of lines of output
you can use -n 0. eu-stack will now warn if the backtrace was insanely large
by default.

> > The backtrace could just be bad causing us to endlessly unwind.
> It no longer can.

If your patch guarantees that then that is good.
But I don't agree that there shouldn't be any limit in eu-stack by default.
Generating hunderd thousands lines of output is not a good default.
With -n 0 users now have the choice which they prefer.



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