Bug 44145 - crash in get_last_value_validate
Summary: crash in get_last_value_validate
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.5
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 20:25 UTC by Ryan Mansfield
Modified: 2010-07-24 21:21 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: mips-unknown-linux-uclibc
Build: i686-pc-linux-gnu
Known to work: 4.6.0
Known to fail:
Last reconfirmed:


Attachments
preprocessed source (72.27 KB, text/plain)
2010-05-14 20:48 UTC, Ryan Mansfield
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Mansfield 2010-05-14 20:25:24 UTC
~/gcc/gcc-4_4-branch/mips-build/gcc$ ./xgcc -v
Using built-in specs.
Target: mips-unknown-linux-uclibc
Configured with: ../configure --target=mips-unknown-linux-uclibc --prefix=/home/ryan/x-tools/mips-unknown-linux-uclibc --with-sysroot=/home/ryan/x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/sys-root --enable-languages=c --disable-multilib --with-float=soft --enable-__cxa_atexit --with-local-prefix=/home/ryan/x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix

I have been only been able to reproduce the segfault on one machine. If the source is preprocessed the crash no longer occurs but valgrind reports several errors. I have not been able to reproduce the crash/valid errors on trunk/4.5.0 or after rev145283.

~/gcc/gcc-4_4-branch/mips-bld/gcc$ valgrind -q ./cc1 -quiet -mplt -mno-shared -O1 t.i
==28263== Invalid read of size 4
==28263==    at 0x84CEA86: get_last_value_validate (regs.h:92)
==28263==    by 0x84CE8C6: get_last_value_validate (combine.c:11808)
==28263==    by 0x84CEE48: record_value_for_reg (combine.c:11421)
==28263==    by 0x84CF2B4: record_dead_and_set_regs (combine.c:11555)
==28263==    by 0x84E5374: rest_of_handle_combine (combine.c:1266)
==28263==    by 0x821EAD5: execute_one_pass (passes.c:1277)
==28263==    by 0x821ED2B: execute_pass_list (passes.c:1326)
==28263==    by 0x821ED3E: execute_pass_list (passes.c:1327)
==28263==    by 0x82F493C: tree_rest_of_compilation (tree-optimize.c:420)
==28263==    by 0x8402C1D: cgraph_expand_function (cgraphunit.c:1047)
==28263==    by 0x8403F84: cgraph_optimize (cgraphunit.c:1106)
==28263==    by 0x805A1DB: c_write_global_declarations (c-decl.c:8118)
==28263==  Address 0x4dc8030 is 0 bytes after a block of size 4,456 alloc'd
==28263==    at 0x4024C1C: malloc (vg_replace_malloc.c:195)
==28263==    by 0x856E127: xmalloc (xmalloc.c:147)
==28263==    by 0x8244766: regstat_init_n_sets_and_refs (regstat.c:63)
==28263==    by 0x84E48E4: rest_of_handle_combine (combine.c:13009)
==28263==    by 0x821EAD5: execute_one_pass (passes.c:1277)
==28263==    by 0x821ED2B: execute_pass_list (passes.c:1326)
==28263==    by 0x821ED3E: execute_pass_list (passes.c:1327)
==28263==    by 0x82F493C: tree_rest_of_compilation (tree-optimize.c:420)
==28263==    by 0x8402C1D: cgraph_expand_function (cgraphunit.c:1047)
==28263==    by 0x8403F84: cgraph_optimize (cgraphunit.c:1106)
==28263==    by 0x805A1DB: c_write_global_declarations (c-decl.c:8118)
==28263==    by 0x82B9839: toplev_main (toplev.c:981)
==28263== 
==28263== Invalid read of size 4
==28263==    at 0x84CEA86: get_last_value_validate (regs.h:92)
==28263==    by 0x84CE8C6: get_last_value_validate (combine.c:11808)
==28263==    by 0x84CEBD9: get_last_value (combine.c:11876)
==28263==    by 0x84D195C: if_then_else_cond (combine.c:7975)
==28263==    by 0x84D1A9D: if_then_else_cond (combine.c:7845)
==28263==    by 0x84DAACB: combine_simplify_rtx (combine.c:4608)
==28263==    by 0x84DD5F4: subst (combine.c:4547)
==28263==    by 0x84DD6EC: subst (combine.c:4485)
==28263==    by 0x84E1174: try_combine (combine.c:2732)
==28263==    by 0x84E50E5: rest_of_handle_combine (combine.c:1139)
==28263==    by 0x821EAD5: execute_one_pass (passes.c:1277)
==28263==    by 0x821ED2B: execute_pass_list (passes.c:1326)
==28263==  Address 0x4dc8030 is 0 bytes after a block of size 4,456 alloc'd
==28263==    at 0x4024C1C: malloc (vg_replace_malloc.c:195)
==28263==    by 0x856E127: xmalloc (xmalloc.c:147)
==28263==    by 0x8244766: regstat_init_n_sets_and_refs (regstat.c:63)
==28263==    by 0x84E48E4: rest_of_handle_combine (combine.c:13009)
==28263==    by 0x821EAD5: execute_one_pass (passes.c:1277)
==28263==    by 0x821ED2B: execute_pass_list (passes.c:1326)
==28263==    by 0x821ED3E: execute_pass_list (passes.c:1327)
==28263==    by 0x82F493C: tree_rest_of_compilation (tree-optimize.c:420)
==28263==    by 0x8402C1D: cgraph_expand_function (cgraphunit.c:1047)
==28263==    by 0x8403F84: cgraph_optimize (cgraphunit.c:1106)
==28263==    by 0x805A1DB: c_write_global_declarations (c-decl.c:8118)
==28263==    by 0x82B9839: toplev_main (toplev.c:981)
==28263==
Comment 1 Ryan Mansfield 2010-05-14 20:48:04 UTC
Created attachment 20661 [details]
preprocessed source