Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] [patch] Fix crash on empty DWARF expressions NULL DATA vs. zero SIZE
Date: Thu, 13 Oct 2011 08:05:00 -0000	[thread overview]
Message-ID: <4E969B83.1030404@codesourcery.com> (raw)
In-Reply-To: <20111012220436.GA30417@host1.jankratochvil.net>

On 10/13/2011 06:04 AM, Jan Kratochvil wrote:
>> gdb/
>> 2011-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
>> 
>> 	Fix empty DWARF expressions DATA vs. SIZE conditionals.
>> 	* dwarf2loc.c (dwarf2_find_location_expression): Clear *LOCEXPR_LENGTH.
>> 	(dwarf_expr_frame_base_1): Indicate unavailability via zero *LENGTH.
>> 	(locexpr_tracepoint_var_ref): Check only zero SIZE, not zero DATA.
>> 	(loclist_read_variable, loclist_tracepoint_var_ref): Do not check for
>> 	zero DATA.
>> 	* dwarf2loc.h (struct dwarf2_locexpr_baton): Comment DATA vs. SIZE
>> 	validity.
>> 	* dwarf2read.c (struct dwarf_block): Comment DATA validity.
>> 	(dwarf2_fetch_die_location_block, dwarf2_symbol_mark_computed): Do not
>> 	clear DATA on zero SIZE.

Jan,
This patch causes a build failure,

gcc -g -O2   -I. -I../../src/gdb -I../../src/gdb/common
-I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
-DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd
-I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber
-I../../src/gdb/../libdecnumber  -I../../src/gdb/gnulib -Ignulib
-DTUI=1  -Wall -Wdeclaration-after-statement -Wpointer-arith
-Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value
-Wunused-function -Wno-switch -Wno-char-subscripts -Werror -c -o
dwarf2read.o -MT dwarf2read.o -MMD -MP -MF .deps/dwarf2read.Tpo
../../src/gdb/dwarf2read.c
cc1: warnings being treated as errors
../../src/gdb/dwarf2read.c: In function ‘dwarf2_fetch_die_location_block’:
../../src/gdb/dwarf2read.c:14204: error: ‘retval.data’ may be used
uninitialized in this function
make[2]: *** [dwarf2read.o] Error 1

-- 
Yao (齐尧)


  reply	other threads:[~2011-10-13  8:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13 17:03 Jan Kratochvil
2011-10-12 22:04 ` [commit] " Jan Kratochvil
2011-10-13  8:05   ` Yao Qi [this message]
2011-10-13  9:38     ` [obv] Fix warning: initialize unused field [Re: [commit] [patch] Fix crash on empty DWARF expressions NULL DATA vs. zero SIZE] Jan Kratochvil

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=4E969B83.1030404@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox