public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: <hjl@lucon.org>
Cc: <binutils@sources.redhat.com>
Subject: Re: IA64 gas is broken
Date: Mon, 14 Feb 2005 11:02:00 -0000	[thread overview]
Message-ID: <s21062d4.067@emea1-mh.id2.novell.com> (raw)

>>> "H. J. Lu" <hjl@lucon.org> 11.02.05 21:58:33 >>>
>On Fri, Feb 11, 2005 at 11:46:46AM -0800, H. J. Lu wrote:
>> [hjl@gnu-4 tmp]$ cat crti.s
>>         .xdata8
".init_array",@fptr(__pthread_initialize_minimal_internal)
>> [hjl@gnu-4 tmp]$ gcc -c crti.s
>> gcc: Internal error: Segmentation fault (program as)
>> Please submit a full bug report.
>> See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
>> 
>
>This obstack_free calls in patch
>
>http://sourceware.org/ml/binutils/2005-02/msg00029.html 
>
>is the cause. set_section uses the memory. I will back out the
following
>patch.

The memory isn't used, it's just that (once again) the use of an
obstack here is not ideal; two other allocations happen against the
notes obstack, due to the section symbol getting created. Note that I
didn't catch that because your source code again violates the
specification (and gas doesn't check/enforce this): .xdata is not
supposed to create new sections.

Additionally, there's more broken in the orginal code than it first
seems: parse_section_name parses the name (perhaps removing quotes), and
then obj_elf_section_name does so again; I guess we should rather pass
the original input to obj_elf_section (thus at once removing the memory
leak)...

The question thus is: Should the assembler continue to violate the spec
and allow .xdata to create sections (in which case the second change
would be at least desirable), or should it be fixed, in which case
probably calling obj_elf_change_section might not be necessary at all
anymore, thus allowing to free the allocated name string.

Jan

             reply	other threads:[~2005-02-14  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-14 11:02 Jan Beulich [this message]
2005-02-15 12:18 ` James E Wilson
  -- strict thread matches above, loose matches on Subject: below --
2005-02-11 22:30 H. J. Lu
2005-02-12  0:20 ` H. J. Lu

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=s21062d4.067@emea1-mh.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=binutils@sources.redhat.com \
    --cc=hjl@lucon.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.
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).