GNU bug report logs -
#29183
27.0.50; SIGSEGV on C-g on Windows
Previous Next
Reported by: John Mastro <john.b.mastro <at> gmail.com>
Date: Mon, 6 Nov 2017 22:00:02 UTC
Severity: normal
Tags: fixed
Merged with 29213
Found in version 27.0.50
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Paul Eggert <eggert <at> 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
This bug report was last modified 7 years and 233 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.