[PATCH] Save final 'error' in __nptl_setxid_error()

Peter Zelezny peter.zelezny@dektech.com.au
Wed Sep 20 00:46:00 GMT 2017


On 19/09/17 19:43, Florian Weimer wrote:

> On 09/19/2017 09:55 AM, Peter Zelezny wrote:
>> -      if (olderror != -1)
>> +      if (olderror != -1) {
>> +    /* save error to memory so it's not lost in coredumps.  */
>> +    cmdp->error = error;
>>       /* Mismatch between current and previous results.  */
>>       abort ();
>> +    }
>
> Would you please change the formatting so that the { } are on lines by 
> themselves (see the surrounding code for examples)?
>
> I think it's better to store the error code in a new local volatile 
> int variable, so that both old and new error code are accessible.  The 
> old error code seems quite valuable, too.
>
> Thanks,
> Florian

I hope I got the indentation right now, copying nearby code (one tab and 
two spaces).

Yes, perhaps just saving this to a local stack int would be better, like 
this?

Cheers,
-Peter.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-setxid-saveerror2.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170920/aa45d887/attachment.bin>


More information about the Libc-alpha mailing list