This is the mail archive of the 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: [PATCH 01/19] nptl: Fix testcases for new pthread cancellation mechanism

On 12/12/2017 10:18, Florian Weimer wrote:
> On 12/11/2017 08:06 PM, Adhemerval Zanella wrote:
>> It also changes how to call the read syscall on tst-backtrace{5,6}
>> to use syscall instead of read cancelable syscall to avoid need to
>> handle the cancelable bridge function calls.  It requires a change
>> on powerpc syscall implementation to create a stackframe, since
>> powerpc backtrace rely on such information.
> The powerpc is a separate change and should go in separately, with a separate bug number, IMHO.

Alright I can split the powerpc change on a different path.

> The existence of this bug also suggests to me that you're patching the test to check something else, so maybe we need better backtrace testing coverage for more syscall implementation variants.  But that's just an aside.

The test still check backtrace across signal frames, I changed it to use
syscall (...) instead of a direct wrapper call mainly to make it work on
both current implementation and newer one.

Another possible option is to rewrite the test and add it on my
02/19 patch to take in account the new backtrace layout. 

>> +    /* Creates a minimum stack frame so backtrace.  */
> “so backtrace works”?
>> +#ifdef __powerpc64__
>> +    addi r1, r1, FRAME_MIN_SIZE
>> +#else
>> +    addi r1,r1,16
>> +#endif
>> +        cfi_def_cfa_offset (0)
>>      sc
> I find the extent of this pseudo-stack frame rather puzzling.

This is mainly to make our backtrace.c implementation on powerpc
to get the frame that actually called syscall (...).  Current
powerpc just check the stacktrace on *sp, so there is no need
fully frame pointer info generated by -fno-omit-frame pointer.

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