unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: John Mastro <john.b.mastro@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 29183@debbugs.gnu.org
Subject: bug#29183: 27.0.50; SIGSEGV on C-g on Windows
Date: Wed, 8 Nov 2017 15:41:05 -0800	[thread overview]
Message-ID: <CAOj2CQTKVMwaPr-8J_vaRn5ukvQ5yadxJy9EhQgH4h7CGzqZ=w@mail.gmail.com> (raw)
In-Reply-To: <571b940d-666b-c650-429d-5fc7bfc0d078@cs.ucla.edu>

Paul Eggert <eggert@cs.ucla.edu> wrote:
> What is the difference in assembly-language output when you compile with
> this:
>
>   static struct thread_state GCALIGNED main_thread;
>
> versus this?
>
>   static struct thread_state main_thread;

I don't know/read assembly, so I'm not sure if this is what you're
looking for, but the only line in the diff between the two resulting
files that mentions main_thread is that the output from the source with
GCALIGNED says:

    .lcomm main_thread,592,8

Whereas the assembly output from the source without GCALIGNED says:

    .lcomm main_thread,592,32

The diff is quite large though, 3,685 lines. Almost all of them are
either ".uleb128" or ".long" followed by an operand (the operand being
what differs).

> What is the assembly-language output when compiling the following little
> program, when compiled the same way that you compile thread.c?
>
>   struct thread_state { int x; };
>   static struct thread_state __attribute__ ((aligned (8))) a;
>   static struct thread_state b;
>   struct thread_state *c[] = { &a, &b };
>
> On my platform, compiling this with gcc -S yields the following, which looks
> properly aligned:
>
>         .file   "t.c"
>         .local  a
>         .comm   a,4,8
>         .local  b
>         .comm   b,4,4
>         .globl  c
>         .data
>         .align 16
>         .type   c, @object
>         .size   c, 16
> c:
>         .quad   a
>         .quad   b
>         .ident  "GCC: (GNU) 7.2.1 20170915 (Red Hat 7.2.1-2)"
>         .section        .note.GNU-stack,"",@progbits

I get the following:

        .file  "t.c"
        .text
.Ltext0:
        .cfi_sections  .debug_frame
        .globl c
        .data
        .align 16
c:
        .quad  a
        .quad  b
.lcomm b,4,4
.lcomm a,4,8
        .text
.Letext0:
        .file 1 "t.c"
        .section        .debug_info,"dr"
[... a bunch of .Ldebug_* sections ...]
.Ldebug_line0:
        .section        .debug_str,"dr"
        .ident "GCC: (Rev1, Built by MSYS2 project) 7.2.0"

Let me know if I can provide any other information.

        John





  reply	other threads:[~2017-11-08 23:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 21:58 bug#29183: 27.0.50; SIGSEGV on C-g on Windows John Mastro
2017-11-07  3:36 ` Eli Zaretskii
2017-11-07 18:14   ` John Mastro
2017-11-07 19:41     ` Eli Zaretskii
2017-11-07 21:24       ` John Mastro
2017-11-08  3:43         ` Eli Zaretskii
2017-11-08 18:35           ` John Mastro
2017-11-08 18:53             ` Eli Zaretskii
2017-11-08 22:46               ` Paul Eggert
2017-11-08 23:41                 ` John Mastro [this message]
2017-11-09  4:56                   ` Paul Eggert
2017-11-09 17:59                     ` John Mastro
2017-11-09 14:59 ` Davor Rotim
2017-11-09 17:04   ` Eli Zaretskii
2017-11-09 18:10     ` Davor Rotim
2017-12-01 10:00   ` Noam Postavsky

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAOj2CQTKVMwaPr-8J_vaRn5ukvQ5yadxJy9EhQgH4h7CGzqZ=w@mail.gmail.com' \
    --to=john.b.mastro@gmail.com \
    --cc=29183@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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/emacs.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).