[Bug 210798] devel/gdb: compile-loc2c.c's do_compile_dwarf_expr_to_c( . . . ) uses uoffset += . . . with uoffset uninitialized as of -r417989; at least one other uninitialized example

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jul 3 21:05:08 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210798

--- Comment #3 from Mark Millard <markmi at dsl-only.net> ---
(In reply to Mark Millard from comment #0)

I probably should have been explicit that for the do_compile_dwarf_expr_to_c
code as it is:

push (indent, stream, uoffset);

always involves uoffset's uninitialized value.

If the "+=" were just "=" then the lack of a else assigning a value to uoffset
would still have a path in which uoffset involved an uninitialized value in the
push call.

But it may be that an initialization of uoffset to something like 0 may take
care of things without an explicit else: the above wording is not trying to
point out the specific fix to make.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list