This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit] [patch] Fix crash on empty DWARF expressions NULL DATA vs. zero SIZE

On 10/13/2011 06:04 AM, Jan Kratochvil wrote:
>> gdb/
>> 2011-07-13  Jan Kratochvil  <>
>> 	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.

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
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 (éå)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]