unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 30820@debbugs.gnu.org
Subject: bug#30820: Chunked store references in compiled code break grafting (again)
Date: Mon, 19 Mar 2018 23:29:10 +0100	[thread overview]
Message-ID: <87d0zzg0nd.fsf@gnu.org> (raw)
In-Reply-To: <20180319222205.2e35f26f@scratchpost.org> (Danny Milosavljevic's message of "Mon, 19 Mar 2018 22:22:05 +0100")

Heya,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

>> The second issue is that the patch only ever worked with literal
>> strings.  It does not “see” strings in constant arrays like the ‘str’
>> array in the example above.
>> 
>> The gconv-module file name mentioned in the first message in this bug
>> report is an example of a string assigned to a static array, in
>> iconv/gconv_conf.c:
>> 
>>   /* This is the default path where we look for module lists.  */
>>   static const char default_gconv_path[] = GCONV_PATH;
>
> I don't understand why this is a problem.  Grafting would just
> mutate default_gconv_path, right?  Who cares how the runtime memcpy
> works (if there's no literal as source)?

At compile-time, GCC finds out that ‘default_gconv_path’ is used only
in one place, in an strcpy call.  Thus, it chooses to use the movabs
optimization, and as a consequence, to split ‘default_gconv_path’ in
8-byte chunks.  It can do so because it’s ‘static’.

Ludo’.

  reply	other threads:[~2018-03-19 22:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 15:47 bug#30820: Chunked store references in compiled code break grafting (again) Ludovic Courtès
2018-03-14 17:24 ` Ludovic Courtès
2018-03-16  8:54   ` bug#30395: " Ludovic Courtès
2018-03-20 23:07     ` Ludovic Courtès
2018-03-21  6:39       ` Ricardo Wurmus
2018-03-21 20:59         ` Ludovic Courtès
2018-03-19 21:22   ` Danny Milosavljevic
2018-03-19 22:29     ` Ludovic Courtès [this message]
2018-03-19 19:05 ` Mark H Weaver
2018-03-19 19:16   ` Mark H Weaver
2018-03-19 21:34   ` Danny Milosavljevic
2018-03-19 22:27     ` Ludovic Courtès
2018-03-20  1:04     ` Mark H Weaver
2018-03-20  8:50       ` Ludovic Courtès
2018-03-19 22:34   ` Ludovic Courtès
2018-03-20  0:52     ` Mark H Weaver
2018-03-20  8:56       ` Ludovic Courtès
2018-03-21  4:17         ` Mark H Weaver
2018-03-21  5:43   ` Mark H Weaver

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87d0zzg0nd.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=30820@debbugs.gnu.org \
    --cc=dannym@scratchpost.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).