public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Rogerio Alves <rcardoso@linux.vnet.ibm.com>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: libc-alpha@sourceware.org
Subject: Re: [RFC] powerpc: restore TOC when static longjmp to shared object
Date: Fri, 25 May 2018 19:39:00 -0000	[thread overview]
Message-ID: <2b5a4221-f766-0f57-1aa5-94991c4dfa8e@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.LNX.2.20.13.1805231637590.27433@monopod.intra.ispras.ru>



Em 23-05-2018 11:24, Alexander Monakov escreveu:
> On Wed, 23 May 2018, Rogerio Alves wrote:
>> I don't think that alloca/memset should destroy the caller stack like is
>> happening but, also I think we have to restore TOC to the caller frame after
>> the longjmp in that case also. I don't know if there's any other more direct
>> and robust ways to checking if TOC is correctly restored. I can't think in
>> anything easier than always restore.
> 
> I'm not challenging the idea that "always restoring" is an appropriate fix.
> My question was about *verifying* that TOC register is restored as it ought
> to, i.e. how the testcase needs to work. Right now, the test uses my code
> from Bugzilla that worked okay for demonstration purposes, but has issues as
> a long-term testsuite addition:
>
> * it demonstrates the issue in a very intransparent fashion, relying on
>    non-obvious interaction with alloca-memset part of the test;
> 
> * when GCC manages to optimize out the alloca-memset part, the test
>    will cease to work for the intended purpose.
> 
> Alexander
> 

Ok. I understand your concern. Let me see if I can change this test to 
check if the TOC was been restored.

Rogerio

  reply	other threads:[~2018-05-25 19:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f88767a0-1a38-564d-7bd8-0b5db5bc04df@linux.vnet.ibm.com>
2018-05-22 18:41 ` Rogerio Alves
2018-05-23  9:27   ` Alexander Monakov
2018-05-23 12:33     ` Rogerio Alves
2018-05-23 13:45       ` Tulio Magno Quites Machado Filho
2018-05-23 14:25       ` Alexander Monakov
2018-05-25 19:39         ` Rogerio Alves [this message]
2018-06-04 14:34           ` Rogerio Alves
2018-06-04 14:38             ` Florian Weimer
2018-06-21 19:14               ` Rogerio Alves
2018-07-16 19:11                 ` Tulio Magno Quites Machado Filho
2018-05-15 17:29 Rogerio Alves
2018-05-15 18:53 ` Florian Weimer
2018-05-15 19:15   ` Rogerio Alves
2018-05-15 20:49   ` Tulio Magno Quites Machado Filho
2018-05-16 19:36     ` Rogerio Alves
2018-05-16 20:56       ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b5a4221-f766-0f57-1aa5-94991c4dfa8e@linux.vnet.ibm.com \
    --to=rcardoso@linux.vnet.ibm.com \
    --cc=amonakov@ispras.ru \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).