This is the mail archive of the gcc-bugs@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]

[Bug debug/68899] New: [6 Regression] Invalid read of size: 3 occurences in get_line_width_without_trailing_whitespace (diagnostic-show-locus.c:413)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68899

            Bug ID: 68899
           Summary: [6 Regression] Invalid read of size: 3 occurences in
                    get_line_width_without_trailing_whitespace
                    (diagnostic-show-locus.c:413)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Hello.

Looks some unit tests started to produce Invalid reads:

spawn /home/mliska/gcc/objdir/gcc/xgcc -B/home/mliska/gcc/objdir/gcc/
/home/mliska/gcc/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw.c
-B/home/mliska/gcc/objdir/x86_64-pc-linux-gnu/./libmpx/
-B/home/mliska/gcc/objdir/x86_64-pc-linux-gnu/./libmpx/mpxrt
-L/home/mliska/gcc/objdir/x86_64-pc-linux-gnu/./libmpx/mpxrt/.libs
-B/home/mliska/gcc/objdir/x86_64-pc-linux-gnu/./libmpx/
-B/home/mliska/gcc/objdir/x86_64-pc-linux-gnu/./libmpx/mpxwrap
-L/home/mliska/gcc/objdir/x86_64-pc-linux-gnu/./libmpx/mpxwrap/.libs
-fno-diagnostics-show-caret -fdiagnostics-color=never
-fplugin=./diagnostic_plugin_test_show_locus.so -O -fdiagnostics-show-caret -S
-o diagnostic-test-show-locus-bw.s

/home/mliska/gcc/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw.c:
In function 'test_very_wide_line':
==79749== Invalid read of size 1
==79749==    at 0xFF1A54: get_line_width_without_trailing_whitespace
(diagnostic-show-locus.c:405)
==79749==    by 0xFF1A54: print_source_line (diagnostic-show-locus.c:512)
==79749==    by 0xFF1A54: diagnostic_show_locus(diagnostic_context*,
diagnostic_info const*) (diagnostic-show-locus.c:803)
==79749==    by 0x63DC85A: custom_diagnostic_finalizer(diagnostic_context*,
diagnostic_info*) (diagnostic_plugin_test_show_locus.c:136)
==79749==    by 0xFEFA11: diagnostic_report_diagnostic(diagnostic_context*,
diagnostic_info*) (diagnostic.c:800)
==79749==    by 0xFF0338: warning_at(unsigned int, int, char const*, ...)
(diagnostic.c:1029)
==79749==    by 0x63DCD98: test_show_locus(function*)
(diagnostic_plugin_test_show_locus.c:247)
==79749==    by 0x63DD1C3: pass_test_show_locus::execute(function*)
(diagnostic_plugin_test_show_locus.c:336)
==79749==    by 0x8E011C: execute_one_pass(opt_pass*) (passes.c:2336)
==79749==    by 0x8E0657: execute_pass_list_1(opt_pass*) (passes.c:2410)
==79749==    by 0x8E06B4: execute_pass_list(function*, opt_pass*)
(passes.c:2421)
==79749==    by 0x8DF008: do_per_function_toporder(void (*)(function*, void*),
void*) (passes.c:1725)
==79749==    by 0x8E0D16: execute_ipa_pass_list(opt_pass*) (passes.c:2763)
==79749==    by 0x69F8E4: ipa_passes (cgraphunit.c:2247)
==79749==    by 0x69F8E4: symbol_table::compile() (cgraphunit.c:2386)
==79749==  Address 0x606fda6 is 22 bytes after a block of size 144 in arena
"client"

Thanks,
Martin

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