This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] Fix dwarf2asm crashes on alpha-vms


Hi!

-Wformat-security shows a real problem, although it supposedly affects only
alpha-vms target (but the code is compiled in everywhere except for
ia64-vms).

dw2_asm_output_delta is printf like, so passing just comment to it
will lead to segfault, because the comment will usually be "%s" and there is
no further argument.

Turning dw2_asm_output_delta into a wrapper around dw2_asm_output_delta_1
that would take va_list instead of ... looks to me like pessimizing all
targets for the sake of an almost extinct alpha-vms, so I'm attaching 3
other options.  One is to change dwarf2out.c only to call the
dw2_asm_output_vms_delta function only on ia64-vms and nowhere else, the
other is to just don't print the -dA comments on the alpha-vms deltas,
and the last one duplicate tiny bit of dw2_asm_output_delta into
dw2_asm_output_vms_delta (after all, big chunk is already duplicated there
anyway).

Any preferences?

	Jakub

Attachment: V484
Description: Text document

Attachment: V484a
Description: Text document

Attachment: V484b
Description: Text document


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