mailing list of musl libc
 help / color / mirror / code / Atom feed
From: NRK <nrk@disroot.org>
To: musl@lists.openwall.com
Cc: "Jₑₙₛ Gustedt" <jens.gustedt@inria.fr>,
	"Aaron Peter Bachmann" <aaron_ng@inode.at>
Subject: Re: [musl] c23 memset_explicit()
Date: Tue, 19 Mar 2024 16:37:21 +0000	[thread overview]
Message-ID: <fxg6zacf3cvsjklt5rha6ty2qbxvthwuo352dxtzlmo4upqumu@42j5ziybhe6p> (raw)
In-Reply-To: <20240319140213.GJ4163@brightrain.aerifal.cx>

> I'm not sure what the builtin thing was.

IIRC, the idea was that if memset_explicit() is recognized by compilers
then they can make better decision. E.g if the data is held in a
register without any further copy in memory, then compiler can just
clear the register instead of spilling it onto the stack and calling
memset_explicit() on it.

But that's not really relevant for libcs trying to add support for it.
Both of them can co-exist.

- NRK

      parent reply	other threads:[~2024-03-19 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 11:18 Aaron Peter Bachmann
2024-03-19 13:50 ` Jₑₙₛ Gustedt
2024-03-19 14:02   ` Rich Felker
2024-03-19 14:24     ` Jₑₙₛ Gustedt
2024-03-19 15:51     ` Aaron Peter Bachmann
2024-03-19 16:19       ` Rich Felker
2024-03-20  7:42         ` [musl] Re: Potential bug in __res_msend_rc() wrt to union, initialization Aaron Peter Bachmann
2024-03-19 16:37     ` NRK [this message]

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=fxg6zacf3cvsjklt5rha6ty2qbxvthwuo352dxtzlmo4upqumu@42j5ziybhe6p \
    --to=nrk@disroot.org \
    --cc=aaron_ng@inode.at \
    --cc=jens.gustedt@inria.fr \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).