From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2280 invoked by alias); 19 Nov 2014 20:52:24 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2204 invoked by uid 48); 19 Nov 2014 20:52:20 -0000 From: "Joost.VandeVondele at mat dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/63983] New: compile time hog with -fsanitize=undefined Date: Wed, 19 Nov 2014 20:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg02077.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63983 Bug ID: 63983 Summary: compile time hog with -fsanitize=undefined Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: Joost.VandeVondele at mat dot ethz.ch CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Created attachment 34042 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34042&action=edit testcase The attached testcase needs a very long time to compile (well didn't finish in my tests), if compiled with '-c -g -O1 -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=object-size bug.f90', while it takes ~10s without '-fsanitize=undefined -fno-sanitize=object-size'. It seems to be some bad interaction between var tracking and ubsan: > pstack 40731 #0 0x0000000000dc8192 in set_slot_part(dataflow_set_def*, rtx_def*, variable_def**, void*, long, var_init_status, rtx_def*) () #1 0x0000000000dca892 in canonicalize_values_star(variable_def**, dataflow_set_def*) () #2 0x0000000000dcb34f in dataflow_set_merge(dataflow_set_def*, dataflow_set_def*) () #3 0x0000000000dd4905 in vt_find_locations() () #4 0x0000000000dd4d35 in variable_tracking_main() () #5 0x0000000000a6095f in execute_one_pass(opt_pass*) () #6 0x0000000000a60e26 in execute_pass_list_1(opt_pass*) () #7 0x0000000000a60e38 in execute_pass_list_1(opt_pass*) () #8 0x0000000000a60e38 in execute_pass_list_1(opt_pass*) () #9 0x0000000000a60e81 in execute_pass_list(function*, opt_pass*) () #10 0x00000000007731a2 in cgraph_node::expand() () #11 0x00000000007748f3 in symbol_table::compile() () #12 0x0000000000776185 in symbol_table::finalize_compilation_unit() () #13 0x00000000009c59e6 in write_global_declarations() () #14 0x0000000000b2245e in compile_file() () #15 0x0000000000b24739 in toplev::main(int, char**) () #16 0x000000000124df59 in main () > time gfortran -c -g -O1 -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=object-size bug.f90