Bug 52194 - FAIL: gcc.dg/pch/common-1.c -O0 -g -I. (internal compiler error) on PaX enable kernels (RANDMMAP)
Summary: FAIL: gcc.dg/pch/common-1.c -O0 -g -I. (internal compiler error) on PaX enab...
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: pch (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 21:41 UTC by Magnus Granberg
Modified: 2020-01-03 22:59 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Granberg 2012-02-09 21:41:02 UTC
Running /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/testsuite/gcc.dg/pch/pch.exp ...
FAIL: gcc.dg/pch/common-1.c  -O0 -g -I. (internal compiler error)
FAIL: gcc.dg/pch/common-1.c  -O0 -g -I. (test for excess errors)
FAIL: gcc.dg/pch/common-1.c  -O0 -g assembly comparison
FAIL: gcc.dg/pch/common-1.c   -O0  -I. (internal compiler error)
FAIL: gcc.dg/pch/common-1.c   -O0  -I. (test for excess errors)
FAIL: gcc.dg/pch/common-1.c   -O0  assembly comparison
FAIL: gcc.dg/pch/common-1.c   -O1  -I. (internal compiler error)
FAIL: gcc.dg/pch/common-1.c   -O1  -I. (test for excess errors)
FAIL: gcc.dg/pch/common-1.c   -O1  assembly comparison
FAIL: gcc.dg/pch/common-1.c   -O2  -I. (internal compiler error)
FAIL: gcc.dg/pch/common-1.c   -O2  -I. (test for excess errors)
FAIL: gcc.dg/pch/common-1.c   -O2  assembly comparison
FAIL: gcc.dg/pch/common-1.c   -O3 -fomit-frame-pointer  -I. (internal compiler error)
FAIL: gcc.dg/pch/common-1.c   -O3 -fomit-frame-pointer  -I. (test for excess errors)
FAIL: gcc.dg/pch/common-1.c   -O3 -fomit-frame-pointer  assembly comparison
FAIL: gcc.dg/pch/common-1.c   -O3 -g  -I. (internal compiler error)
FAIL: gcc.dg/pch/common-1.c   -O3 -g  -I. (test for excess errors)
FAIL: gcc.dg/pch/common-1.c   -O3 -g  assembly comparison
FAIL: gcc.dg/pch/common-1.c   -Os  -I. (internal compiler error)
FAIL: gcc.dg/pch/common-1.c   -Os  -I. (test for excess errors)
FAIL: gcc.dg/pch/common-1.c   -Os  assembly comparison

                === gcc Summary ===

# of expected passes            14
# of unexpected failures        21

Most pch test fails on PaX enable kernel with

CONFIG_PAX_ASLR=y
CONFIG_PAX_RANDUSTACK=y
CONFIG_PAX_RANDMMAP=y

Program received signal SIGSEGV, Segmentation fault.
linemap_location_from_macro_expansion_p (set=set@entry=0x2e0c3124000, location=location@entry=22)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/line-map.c:775
775       linemap_assert (location <= MAX_SOURCE_LOCATION
Comment 1 Magnus Granberg 2012-02-09 21:54:41 UTC
Fail on older gcc versions to (4.6 4.5 4.4 4.3)
With a simpel pch test code i got this bt

Program received signal SIGSEGV, Segmentation fault.
linemap_location_from_macro_expansion_p (set=set@entry=0x2e0c3124000, location=location@entry=22)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/line-map.c:775
775       linemap_assert (location <= MAX_SOURCE_LOCATION
(gdb) bt
#0  linemap_location_from_macro_expansion_p (set=set@entry=0x2e0c3124000, location=location@entry=22)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/line-map.c:775
#1  0x0000000000c98340 in linemap_lookup (set=set@entry=0x2e0c3124000, line=line@entry=22)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/line-map.c:513
#2  0x0000000000c98681 in linemap_macro_loc_to_def_point (original_map=0x3a3fb46ba70, location=22, set=0x2e0c3124000)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/line-map.c:953
#3  linemap_resolve_location (set=0x2e0c3124000, loc=<optimized out>, lrk=<optimized out>, map=0x3a3fb46ba70)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/line-map.c:1072
#4  0x0000000000c7e6be in diagnostic_report_current_module (context=0x139cc80, where=<optimized out>)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/diagnostic.c:273
#5  0x00000000008167c1 in diagnostic_report_current_function (context=context@entry=0x139cc80, 
    diagnostic=diagnostic@entry=0x3a3fb46bb80)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/tree-diagnostic.c:39
#6  0x0000000000816839 in default_tree_diagnostic_starter (context=0x139cc80, diagnostic=0x3a3fb46bb80)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/tree-diagnostic.c:47
#7  0x0000000000c7f014 in diagnostic_report_diagnostic (context=0x139cc80, diagnostic=diagnostic@entry=0x3a3fb46bb80)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/diagnostic.c:548
#8  0x0000000000c7ff7c in fatal_error (gmsgid=<optimized out>)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/diagnostic.c:827
#9  0x00000000006968d4 in gt_pch_restore (f=0x145d770)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/ggc-common.c:649
#10 0x0000000000548b12 in c_common_read_pch (pfile=0x13d4d00, name=0x13b8030 "doit.h.gch", fd=<optimized out>, 
    orig_name=<optimized out>)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/c-family/c-pch.c:435
#11 0x0000000000c90ee0 in should_stack_file (import=<optimized out>, file=0x13b7f00, pfile=<optimized out>)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/files.c:716
#12 _cpp_stack_file (pfile=0x13d4d00, file=0x13b7f00, import=false)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/files.c:801
#13 0x0000000000c87b29 in do_include_common (pfile=0x13d4d00, type=IT_INCLUDE)
---Type <return> to continue, or q <return> to quit---
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/directives.c:792
#14 0x0000000000c88b95 in _cpp_handle_directive (pfile=0x13d4d00, indented=<optimized out>)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/directives.c:491
#15 0x0000000000c9710d in _cpp_lex_token (pfile=0x13d4d00)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/lex.c:1889
#16 0x0000000000c9c240 in cpp_get_token_1 (pfile=0x13d4d00, location=0x3a3fb46c064)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/libcpp/macro.c:2245
#17 0x0000000000543916 in c_lex_with_flags (value=0x3a3fb46c068, loc=0x3a3fb46c064, cpp_flags=0x0, lex_flags=0)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/c-family/c-lex.c:302
#18 0x00000000004fe565 in c_lex_one_token (parser=0x3a3fb46c060, token=0x3a3fb46c060)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/c-parser.c:221
#19 0x0000000000510bc8 in c_parser_peek_token (parser=0x3a3fb46c060)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/c-parser.c:401
#20 c_parse_file () at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/c-parser.c:10815
#21 0x0000000000547fd5 in c_common_parse_file ()
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/c-family/c-opts.c:1117
#22 0x00000000007f5b08 in compile_file ()
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/toplev.c:557
#23 do_compile () at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/toplev.c:1938
#24 toplev_main (argc=17, argv=0x3a3fb46c208)
    at /var/tmp/portage/sys-devel/gcc-4.7.0_alpha20120204/work/gcc-4.7-20120204/gcc/toplev.c:2014
#25 0x00000355a344736d in __libc_start_main () from /lib64/libc.so.6
#26 0x00000000004d222d in _start ()