Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login


<sangr> home is where the highest bandwidth is

devel / comp.lang.c++ / Re: Find data somewhere on the stack

o Re: Find data somewhere on the stackFrederick Virchanza Gotham

Re: Find data somewhere on the stack


  copy mid

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:4453:b0:765:2eef:e3ba with SMTP id w19-20020a05620a445300b007652eefe3bamr2062qkp.8.1689708853380;
Tue, 18 Jul 2023 12:34:13 -0700 (PDT)
X-Received: by 2002:a05:6808:201e:b0:3a1:f2d4:a3bf with SMTP id
q30-20020a056808201e00b003a1f2d4a3bfmr464849oiw.4.1689708852925; Tue, 18 Jul
2023 12:34:12 -0700 (PDT)
Newsgroups: comp.lang.c++
Date: Tue, 18 Jul 2023 12:34:12 -0700 (PDT)
In-Reply-To: <>
Injection-Info:; posting-host=; posting-account=w4UqJAoAAAAYC-PItfDbDoVGcg0yISyA
References: <>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <>
Subject: Re: Find data somewhere on the stack
From: (Frederick Virchanza Gotham)
Injection-Date: Tue, 18 Jul 2023 19:34:13 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2453
 by: Frederick Virchanza - Tue, 18 Jul 2023 19:34 UTC

On Sunday 23 April 2023, Frederick Virchanza Gotham wrote:
> So if we push this UUID onto the stack,
> and then place our data right beside it on
> the stack, then later on we can search the
> stack for this UUID and we'll find our data
> right beside it.

It's taken me 3 months but today I've come up with a legitimate use for this.

If you've been following the C++ Standard Proposals mailing list these past few days, I'm trying to come up with a universal header file to ensure elision of move/copy operations with Named Return Value Optimisation.

I order to implement this on 64-bit ARM with the aarch64 instruction set, I need to write a function that will:
(1) Move address of return value into 1st parameter
(2) Jump to a location stored in a thread_local variable

It turns out that accessing thread_local variables on aarch64 isn't so simple, as there's more than one system for storing them, see how complicated it can be here:

Furthermore I want the code to work fine on a microcontroller that doesn't have multithreading support.

And so instead of putting the jump address in a thread_local variable, I'll just push it onto the stack beside a known UUID.

I knew this would come in handy somewhere.

devel / comp.lang.c++ / Re: Find data somewhere on the stack


rocksolid light 0.9.81
clearnet tor