This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Add tests that backtrace and backtrace_symbols produce correctresults


On Sat, 19 Jan 2013, Andreas Schwab wrote:

> "Joseph S. Myers" <joseph@codesourcery.com> writes:
> 
> > +  if (strstr (symbols[i++], "read") == NULL)
> > +    {
> > +      /* Perhaps symbols[2] is __kernel_vsyscall?  */
> > +      if (strstr (symbols[i++], "read") == NULL)
> > +	{
> > +	  FAIL ();
> 
> This can only work if you have unwind information.

I'd expect there to be unwind information for read as it's a cancellation 
point; the tests themselves are explicitly built with unwind information.  
If you have actual problems with lack of unwind information (you don't say 
whether you have a real issue, or just something hypothetical from reading 
the code), you'll need to give more details of the platform in question, 
the sequence of frames and where unwind information is present or absent.  
These tests have been tested on x86 and x86_64 for the patch submission, 
and previously on platforms including ARM, MIPS and SH to confirm 
backtracing works properly there, and none of those platforms have shown 
such a problem.

It seems clear that a backtrace *should* show read here (in a form such as 
__read, rather than necessarily plain "read") so if the backtrace on a 
particular platform doesn't show it, it would be best to treat that as a 
bug on that platform and seek to fix it, and only given a detailed 
analysis explaining why it can't effectively be fixed there consider some 
way for an architecture to override particular details of the test.

-- 
Joseph S. Myers
joseph@codesourcery.com


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