public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
@ 2010-12-12 11:43 dominiq at lps dot ens.fr
  2010-12-12 12:27 ` [Bug c/46902] " iains at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-12 11:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

           Summary: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs
                    on powerpc-apple-darwin9
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: dj@redhat.com, ian@airs.com, joseph@codesourcery.com,
                    iains@gcc.gnu.org
              Host: powerpc-apple-darwin9
            Target: powerpc-apple-darwin9
             Build: powerpc-apple-darwin9


Between revisions 166379 and 166752 on my logs the following failures in the
test suite appeared on powerpc-apple-darwin9 with both -m32 and -m64:

FAIL: gcc.dg/plugin/plugindir1.c (internal compiler error)
FAIL: gcc.dg/plugin/plugindir1.c (test for excess errors)
FAIL: gcc.dg/plugin/plugindir2.c (internal compiler error)
FAIL: gcc.dg/plugin/plugindir2.c (test for excess errors)
FAIL: gcc.dg/plugin/plugindir3.c (internal compiler error)
FAIL: gcc.dg/plugin/plugindir3.c (test for excess errors)
FAIL: gcc.dg/plugin/plugindir4.c (internal compiler error)
FAIL: gcc.dg/plugin/plugindir4.c (test for excess errors)

Reduced range from regress: revision 166543 works, revision 166589 fails, see:
http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg00831.html
http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg00875.html
Without better knowledge, revisions 166544, 166552, 16653, 166555, 166565, and
166570 could be candidates (no guarantee about an exhaustive list!-).

These failures are due to ICEs during the compilation

[karma] f90/bug% /opt/gcc/gcc4.6w/bin/gcc -c -fplugin=foo
/opt/gcc/gcc-4.6-work/gcc/testsuite/gcc.dg/plugin/plugindir1.c
[address=fffffffc pc=94afe928]
cc1: internal compiler error: Segmentation Fault

The backtrace is

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffffc
0x94afe928 in strlen ()
(gdb) bt
#0  0x94afe928 in strlen ()
#1  0x008b6414 in concat (first=0xffffffff <Address 0xffffffff out of bounds>)
at ../../gcc-4.6-work/libiberty/concat.c:76
#2  0x0051e660 in add_new_plugin (plugin_name=0xbfffdac2 "foo") at
../../gcc-4.6-work/gcc/plugin.c:157
#3  0x00515888 in handle_common_deferred_options () at
../../gcc-4.6-work/gcc/opts-global.c:385
#4  0x005e3844 in toplev_main (argc=3, argv=0xffffffff) at
../../gcc-4.6-work/gcc/toplev.c:1923
#5  0x00002560 in start ()

This PR seems different from pr43759.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
@ 2010-12-12 12:27 ` iains at gcc dot gnu.org
  2010-12-13 18:20 ` joseph at codesourcery dot com
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-12 12:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-12 12:26:44 UTC ---

this commit triggers the bug..

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00454.html


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
  2010-12-12 12:27 ` [Bug c/46902] " iains at gcc dot gnu.org
@ 2010-12-13 18:20 ` joseph at codesourcery dot com
  2010-12-13 18:45 ` dominiq at lps dot ens.fr
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: joseph at codesourcery dot com @ 2010-12-13 18:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-12-13 18:20:16 UTC ---
On Sun, 12 Dec 2010, dominiq at lps dot ens.fr wrote:

> The backtrace is
> 
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0xfffffffc
> 0x94afe928 in strlen ()
> (gdb) bt
> #0  0x94afe928 in strlen ()
> #1  0x008b6414 in concat (first=0xffffffff <Address 0xffffffff out of bounds>)
> at ../../gcc-4.6-work/libiberty/concat.c:76
> #2  0x0051e660 in add_new_plugin (plugin_name=0xbfffdac2 "foo") at
> ../../gcc-4.6-work/gcc/plugin.c:157

Which of the arguments in the call to concat is invalid?  How did that 
argument get its value?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
  2010-12-12 12:27 ` [Bug c/46902] " iains at gcc dot gnu.org
  2010-12-13 18:20 ` joseph at codesourcery dot com
@ 2010-12-13 18:45 ` dominiq at lps dot ens.fr
  2010-12-13 18:53 ` joseph at codesourcery dot com
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-13 18:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-12-13 18:44:50 UTC ---
> > #0  0x94afe928 in strlen ()
> > #1  0x008b6414 in concat (first=0xffffffff <Address 0xffffffff out of bounds>)
> > at ../../gcc-4.6-work/libiberty/concat.c:76
> > #2  0x0051e660 in add_new_plugin (plugin_name=0xbfffdac2 "foo") at
> > ../../gcc-4.6-work/gcc/plugin.c:157
>
> Which of the arguments in the call to concat is invalid?  How did that 
> argument get its value?

I am fluent neither in C nor gdb. Does not "first=0xffffffff <Address
0xffffffff out of bounds>" answer the first question? I tried to go a little
bit further by setting breakpoints at 'add_new_plugin' and
'default_plugin_dir_name' and tried to print 'plugindir_string', but ran out of
idea at

Breakpoint 3, default_plugin_dir_name () at ../../gcc-4.6-work/gcc/plugin.c:880
880      if (!plugindir_string)
(gdb) p plugindir_string
No symbol "plugindir_string" in current context.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2010-12-13 18:45 ` dominiq at lps dot ens.fr
@ 2010-12-13 18:53 ` joseph at codesourcery dot com
  2010-12-13 19:03 ` dominiq at lps dot ens.fr
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: joseph at codesourcery dot com @ 2010-12-13 18:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-12-13 18:53:41 UTC ---
On Mon, 13 Dec 2010, dominiq at lps dot ens.fr wrote:

> I am fluent neither in C nor gdb. Does not "first=0xffffffff <Address
> 0xffffffff out of bounds>" answer the first question? I tried to go a little
> bit further by setting breakpoints at 'add_new_plugin' and
> 'default_plugin_dir_name' and tried to print 'plugindir_string', but ran out of
> idea at
> 
> Breakpoint 3, default_plugin_dir_name () at ../../gcc-4.6-work/gcc/plugin.c:880
> 880      if (!plugindir_string)
> (gdb) p plugindir_string
> No symbol "plugindir_string" in current context.

Thats global_options.x_plugindir_string.  If it's an invalid pointer then 
setting a watchpoint on it might help show when that pointer was stored 
(or there may be other memory debugging tools available on your platform).

In any case, please post the exact cc1 command line.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2010-12-13 18:53 ` joseph at codesourcery dot com
@ 2010-12-13 19:03 ` dominiq at lps dot ens.fr
  2010-12-13 19:05 ` dominiq at lps dot ens.fr
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-13 19:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-12-13 19:02:59 UTC ---
GDB session:

(gdb) watch -location global_options.x_plugindir_string
Hardware watchpoint 1: *(const char **) 12424292
(gdb) run -fplugin=foo
/opt/gcc/gcc-4.6-work/gcc/testsuite/gcc.dg/plugin/plugindir4.c
Starting program: /opt/gcc/gcc4.6w/libexec/gcc/powerpc-apple-darwin9/4.6.0/cc1
-fplugin=foo /opt/gcc/gcc-4.6-work/gcc/testsuite/gcc.dg/plugin/plugindir4.c
Reading symbols for shared libraries +++++++++++warning: Could not find object
file "/sw/src/fink.build/libiconv-1.12-4/libiconv-1.12/lib/.libs/iconv.o" - no
debug information available for "./iconv.c".

warning: Could not find object file
"/sw/src/fink.build/libiconv-1.12-4/libiconv-1.12/lib/.libs/localcharset.o" -
no debug information available for "./../libcharset/lib/localcharset.c".

warning: Could not find object file
"/sw/src/fink.build/libiconv-1.12-4/libiconv-1.12/lib/.libs/relocatable.o" - no
debug information available for "./relocatable.c".

.......... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffffc
0x94afe928 in strlen ()
(gdb) bt
#0  0x94afe928 in strlen ()
#1  0x008b6414 in concat (first=0xffffffff <Address 0xffffffff out of bounds>)
at ../../gcc-4.6-work/libiberty/concat.c:76
#2  0x0051e624 in add_new_plugin (plugin_name=0xbfffdac2 "foo") at
../../gcc-4.6-work/gcc/plugin.c:157
#3  0x0051584c in handle_common_deferred_options () at
../../gcc-4.6-work/gcc/opts-global.c:385
#4  0x005e3808 in toplev_main (argc=3, argv=0xffffffff) at
../../gcc-4.6-work/gcc/toplev.c:1923
#5  0x000024f4 in start ()
(gdb) watch global_options.x_plugindir_string
Hardware watchpoint 2: global_options.x_plugindir_string
(gdb) run -fplugin=foo
/opt/gcc/gcc-4.6-work/gcc/testsuite/gcc.dg/plugin/plugindir4.c
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /opt/gcc/gcc4.6w/libexec/gcc/powerpc-apple-darwin9/4.6.0/cc1
-fplugin=foo /opt/gcc/gcc-4.6-work/gcc/testsuite/gcc.dg/plugin/plugindir4.c

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffffc
0x94afe928 in strlen ()


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2010-12-13 19:03 ` dominiq at lps dot ens.fr
@ 2010-12-13 19:05 ` dominiq at lps dot ens.fr
  2010-12-13 19:09 ` iains at gcc dot gnu.org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-13 19:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-12-13 19:05:18 UTC ---
Note that adding ' -iplugindir=my-plugindir' to the option does not change the
results.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2010-12-13 19:05 ` dominiq at lps dot ens.fr
@ 2010-12-13 19:09 ` iains at gcc dot gnu.org
  2010-12-13 19:23 ` dominiq at lps dot ens.fr
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-13 19:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.12.13 19:09:16
     Ever Confirmed|0                           |1

--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-13 19:09:16 UTC ---
c/l:

 ./gcc/xgcc -Bgcc /GCC/gcc-live-trunk/gcc/testsuite/gcc.dg/plugin/plugindir1.c 
 -c -fplugin=foo -S  -m32 -o plugindir1.s

(gdb) bt
#0  0x9757f928 in strlen ()
#1  0x00eff460 in vconcat_length (first=0xffffffff <Address 0xffffffff out of
bounds>, args=0xbfffef8c "") at /GCC/gcc-live-trunk/libiberty/concat.c:76
#2  0x00eff6a4 in concat (first=0xffffffff <Address 0xffffffff out of bounds>)
at /GCC/gcc-live-trunk/libiberty/concat.c:159
#3  0x00885274 in add_new_plugin (plugin_name=0xbffff3b6 "foo") at
/GCC/gcc-live-trunk/gcc/plugin.c:157
#4  0x00879444 in handle_common_deferred_options () at
/GCC/gcc-live-trunk/gcc/opts-global.c:385
#5  0x009e83d4 in toplev_main (argc=20, argv=0xbffff140) at
/GCC/gcc-live-trunk/gcc/toplev.c:1923
#6  0x00142760 in main (argc=20, argv=0xbffff140) at
/GCC/gcc-live-trunk/gcc/main.c:36

the code for plugin.c: around line 157:

152           base_name = CONST_CAST (char*, plugin_name);
153           /* FIXME: the ".so" suffix is currently builtin, since plugins
154              only work on ELF host systems like e.g. Linux or Solaris.
155              When plugins shall be available on non ELF systems such as
156              Windows or MacOS, this code has to be greatly improved.  */
157           plugin_name = concat (default_plugin_dir_name (), "/",
158                                 plugin_name, ".so", NULL);
159           if (access (plugin_name, R_OK))
160             fatal_error
161               ("inacessible plugin file %s expanded from short plugin name
%s: %m",

so we probably need to improve the robustness... 
out of time for now ..


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (6 preceding siblings ...)
  2010-12-13 19:09 ` iains at gcc dot gnu.org
@ 2010-12-13 19:23 ` dominiq at lps dot ens.fr
  2010-12-13 20:06 ` iains at gcc dot gnu.org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-13 19:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-12-13 19:22:56 UTC ---
On x86_64-apple-darwin10.5.0, the first test passes as:

Executing on host: /opt/gcc/build_w/gcc/xgcc -B/opt/gcc/build_w/gcc/
/opt/gcc/work/gcc/testsuite/gcc.dg/plugin/finish_unit-test-1.c 
-fplugin=./finish_unit_plugin.so -O -S  -m32 -o finish_unit-test-1.s   
(timeout = 300)
PASS: gcc.dg/plugin/finish_unit-test-1.c -fplugin=./finish_unit_plugin.so (test
for excess errors)
Executing on host: /opt/gcc/build_w/gcc/xgcc -B/opt/gcc/build_w/gcc/
/opt/gcc/work/gcc/testsuite/gcc.dg/plugin/plugindir1.c   -c -fplugin=foo -S 
-m32 -o plugindir1.s    (timeout = 300)
cc1: fatal error: inacessible plugin file /opt/gcc/build_w/gcc/plugin/foo.so
expanded from short plugin name foo: No such file or directory^M
compilation terminated.^M
compiler exited with status 1
output is:
cc1: fatal error: inacessible plugin file /opt/gcc/build_w/gcc/plugin/foo.so
expanded from short plugin name foo: No such file or directory^M
compilation terminated.^M

PASS: gcc.dg/plugin/plugindir1.c (test for excess errors)


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (7 preceding siblings ...)
  2010-12-13 19:23 ` dominiq at lps dot ens.fr
@ 2010-12-13 20:06 ` iains at gcc dot gnu.org
  2010-12-13 20:09 ` iains at gcc dot gnu.org
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-13 20:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-13 20:05:52 UTC ---
hm  although we have:

gcc/common.opt:Common Joined Var(plugindir_string) Init(0)

I get....

Breakpoint 1 at 0x886ea4: file /GCC/gcc-live-trunk/gcc/plugin.c, line 880.
(gdb) run
Starting program: /Volumes/ScratchCS/gcc-4-6-trunk-build/gcc/cc1 -E -quiet -v
-iprefix
/Volumes/ScratchCS/gcc-4-6-trunk-build/gcc/../lib/gcc/powerpc-apple-darwin9/4.6.0/
-isystem gcc/include -isystem gcc/include-fixed -D__DYNAMIC__ -iplugindir=bar
/GCC/gcc-live-trunk/gcc/testsuite/gcc.dg/plugin/plugindir1.c -fPIC
-mmacosx-version-min=10.5.8 -m32 -fplugin=foo -fpch-preprocess -o plugindir1.i
Reading symbols for shared libraries ++++. done

Breakpoint 1, default_plugin_dir_name () at
/GCC/gcc-live-trunk/gcc/plugin.c:880
880       if (!plugindir_string)
(gdb) print plugindir_string
$1 = 0xffffffff <Address 0xffffffff out of bounds>

which is the origin of the current fail (there will be other issues related to
the FIXME, I'm sure).


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (8 preceding siblings ...)
  2010-12-13 20:06 ` iains at gcc dot gnu.org
@ 2010-12-13 20:09 ` iains at gcc dot gnu.org
  2010-12-13 20:24 ` iains at gcc dot gnu.org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-13 20:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-13 20:09:10 UTC ---
(In reply to comment #9)
> hm  although we have:
> 
> gcc/common.opt:Common Joined Var(plugindir_string) Init(0)
> 
> I get....


> (gdb) print plugindir_string
> $1 = 0xffffffff <Address 0xffffffff out of bounds>
> 
> which is the origin of the current fail (there will be other issues related to
> the FIXME, I'm sure).

independent of whether -iplugindir is given on the c/l.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (9 preceding siblings ...)
  2010-12-13 20:09 ` iains at gcc dot gnu.org
@ 2010-12-13 20:24 ` iains at gcc dot gnu.org
  2010-12-13 21:32 ` joseph at codesourcery dot com
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-13 20:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-13 20:23:40 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > hm  although we have:
> > 
> > gcc/common.opt:Common Joined Var(plugindir_string) Init(0)
> > 
> > I get....
> 
> 
> > (gdb) print plugindir_string
> > $1 = 0xffffffff <Address 0xffffffff out of bounds>
> > 
> > which is the origin of the current fail (there will be other issues related to
> > the FIXME, I'm sure).
> 
> independent of whether -iplugindir is given on the c/l.

in fact, the whole of global_options looks suspiciously un-initialized.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (10 preceding siblings ...)
  2010-12-13 20:24 ` iains at gcc dot gnu.org
@ 2010-12-13 21:32 ` joseph at codesourcery dot com
  2010-12-14 11:55 ` iains at gcc dot gnu.org
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: joseph at codesourcery dot com @ 2010-12-13 21:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #12 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-12-13 21:32:15 UTC ---
On Mon, 13 Dec 2010, iains at gcc dot gnu.org wrote:

> > > (gdb) print plugindir_string
> > > $1 = 0xffffffff <Address 0xffffffff out of bounds>
> > > 
> > > which is the origin of the current fail (there will be other issues related to
> > > the FIXME, I'm sure).
> > 
> > independent of whether -iplugindir is given on the c/l.
> 
> in fact, the whole of global_options looks suspiciously un-initialized.

It's supposed to be runtime-initialized from global_options_init; see 
init_options_struct.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (11 preceding siblings ...)
  2010-12-13 21:32 ` joseph at codesourcery dot com
@ 2010-12-14 11:55 ` iains at gcc dot gnu.org
  2010-12-14 12:58 ` iains at gcc dot gnu.org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-14 11:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #13 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-14 11:55:39 UTC ---
(In reply to comment #12)
> On Mon, 13 Dec 2010, iains at gcc dot gnu.org wrote:
> 
> > > > (gdb) print plugindir_string
> > > > $1 = 0xffffffff <Address 0xffffffff out of bounds>
> > > > 
> > > > which is the origin of the current fail (there will be other issues related to
> > > > the FIXME, I'm sure).
> > > 
> > > independent of whether -iplugindir is given on the c/l.
> > 
> > in fact, the whole of global_options looks suspiciously un-initialized.
> 
> It's supposed to be runtime-initialized from global_options_init; see 
> init_options_struct.

[this analysis with the stage1 compiler, I will look again with the stage2
one].

:-( 
... we seem to have a miscomputation of the offset to
global_options.x_plugindir_string in the default_plugin_dir_name () function.

    ; basic block 5
    ; /GCC/gcc-live-trunk/gcc/plugin.c:883
LM330:
    addis r2,r31,ha16(L_global_options$non_lazy_ptr-"L00000000023$pb")    ;
tmp129,,
    lwz r2,lo16(L_global_options$non_lazy_ptr-"L00000000023$pb")(r2)    ;
tmp128,, tmp129
    lwz r0,2044(r2)    ; global_options.x_plugindir_string, D.22779

===
(gdb) print &global_options                   
$14 = (struct gcc_options *) 0x4129d920
(gdb) print &global_options.x_plugindir_string
$15 = (const char **) 0x4129e108

(gdb) print/x 0x4129d920 + 2044 (0x7fc)
$17 = 0x4129e11c

=======
rs6000.s:
    addis r2,r31,ha16(L_global_options$non_lazy_ptr-"L00000000008$pb")    ;
tmp926,,
    lwz r2,lo16(L_global_options$non_lazy_ptr-"L00000000008$pb")(r2)    ;
tmp925,, tmp926
    lwz r0,2044(r2)    ; global_options.x_TARGET_ALWAYS_HINT, D.70115
======
Have to think of how to pursue this further...


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (12 preceding siblings ...)
  2010-12-14 11:55 ` iains at gcc dot gnu.org
@ 2010-12-14 12:58 ` iains at gcc dot gnu.org
  2010-12-14 13:41 ` iains at gcc dot gnu.org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-14 12:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #14 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-14 12:58:20 UTC ---
the stage3 compiler is the same.

it appears that plugin.c thinks there are [5] more options than there are... 

at the moment, dunno if this is a code-gen or a config issue.

.. so it's picking up x_TARGET_ALWAYS_HINT instead of x_plugindir_string.

  x_plugindir_string = 0x0, 
  x_aix_struct_return = 0, 
  x_TARGET_ALIGN_BRANCH_TARGETS = -1, 
  x_TARGET_ALLOW_DF_PERMUTE = 0, 
  x_TARGET_ALLOW_MOVMISALIGN = -1, 
  x_TARGET_ALWAYS_HINT = -1,


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (13 preceding siblings ...)
  2010-12-14 12:58 ` iains at gcc dot gnu.org
@ 2010-12-14 13:41 ` iains at gcc dot gnu.org
  2010-12-14 14:35 ` iains at gcc dot gnu.org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-14 13:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-14 13:41:02 UTC ---
OK, seems to be related to _Bool vs. unsigned char.

e.g.:

  unsigned char x_exit_after_options;
#define exit_after_options global_options.x_exit_after_options

c.f.

  _Bool x_exit_after_options;
#define exit_after_options global_options.x_exit_after_options

not sure where that is coming from...


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (14 preceding siblings ...)
  2010-12-14 13:41 ` iains at gcc dot gnu.org
@ 2010-12-14 14:35 ` iains at gcc dot gnu.org
  2010-12-16 14:38 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2010-12-14 14:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #16 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-14 14:34:59 UTC ---
this is a fix (but, clearly, there's something fragile here).
 #include <dlfcn.h>
 includes <stdbool.h>

I'm not sure why that should cause a problem since the translation of bool to
int should not be active for gcc >= 3 : 

#define    bool    _Bool
#if __STDC_VERSION__ < 199901L && __GNUC__ < 3
typedef    int    _Bool;
#endif


====

Index: gcc/plugin.c
===================================================================
--- gcc/plugin.c        (revision 167762)
+++ gcc/plugin.c        (working copy)
@@ -22,6 +22,13 @@ along with GCC; see the file COPYING3.  If not see

 #include "config.h"
 #include "system.h"
+#include "coretypes.h"
+#include "diagnostic-core.h"
+#include "tree.h"
+#include "tree-pass.h"
+#include "intl.h"
+#include "timevar.h"
+#include "ggc.h"

 /* If plugin support is not enabled, do not try to execute any code
    that may reference libdl.  The generic code is still compiled in to
@@ -31,14 +38,7 @@ along with GCC; see the file COPYING3.  If not see
 #include <dlfcn.h>
 #endif

-#include "coretypes.h"
-#include "diagnostic-core.h"
-#include "tree.h"
-#include "tree-pass.h"
-#include "intl.h"
 #include "plugin.h"
-#include "timevar.h"
-#include "ggc.h"

 #ifdef ENABLE_PLUGIN
 #include "plugin-version.h"


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (15 preceding siblings ...)
  2010-12-14 14:35 ` iains at gcc dot gnu.org
@ 2010-12-16 14:38 ` rguenth at gcc dot gnu.org
  2010-12-16 22:08 ` mrs at gcc dot gnu.org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-16 14:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (16 preceding siblings ...)
  2010-12-16 14:38 ` rguenth at gcc dot gnu.org
@ 2010-12-16 22:08 ` mrs at gcc dot gnu.org
  2011-01-09 13:02 ` iains at gcc dot gnu.org
  2011-01-09 13:09 ` dominiq at lps dot ens.fr
  19 siblings, 0 replies; 21+ messages in thread
From: mrs at gcc dot gnu.org @ 2010-12-16 22:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

mrs@gcc.gnu.org <mrs at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrs at gcc dot gnu.org

--- Comment #17 from mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> 2010-12-16 22:08:30 UTC ---
The code that has bool or _Bool being 1 byte is wrong, it is 4 bytes.  The host
compilers have always done this, as should all the FSF compilers.  Do you see
another other than this:

$ cat  t.c
int sz = sizeof(_Bool);
$ gcc -arch ppc t.c -S -o -
    .machine ppc7400
_sz:
    .long    4

with either the host compilers or gcc?  I'd expect that there is code that uses
char or unsigned char and expects that to be abi compatible with bool.  It
isn't.  _Bool would be however.  In sizeof expressions, one should use
sizeof(bool) instead of an explicit or implicit 1.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (17 preceding siblings ...)
  2010-12-16 22:08 ` mrs at gcc dot gnu.org
@ 2011-01-09 13:02 ` iains at gcc dot gnu.org
  2011-01-09 13:09 ` dominiq at lps dot ens.fr
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2011-01-09 13:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

--- Comment #19 from Iain Sandoe <iains at gcc dot gnu.org> 2011-01-09 12:41:37 UTC ---
Author: iains
Date: Sun Jan  9 12:41:33 2011
New Revision: 168611

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168611
Log:

    PR gcc/46902
    PR testsuite/46912
    * plugin.c: Move include of dlfcn.h from here...
    * system.h: ... to here.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/plugin.c
    trunk/gcc/system.h


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9
  2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
                   ` (18 preceding siblings ...)
  2011-01-09 13:02 ` iains at gcc dot gnu.org
@ 2011-01-09 13:09 ` dominiq at lps dot ens.fr
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-01-09 13:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #20 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-01-09 13:01:40 UTC ---
Closing as fixed, thanks for the patch.


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-01-09 13:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-12 11:43 [Bug c/46902] New: [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9 dominiq at lps dot ens.fr
2010-12-12 12:27 ` [Bug c/46902] " iains at gcc dot gnu.org
2010-12-13 18:20 ` joseph at codesourcery dot com
2010-12-13 18:45 ` dominiq at lps dot ens.fr
2010-12-13 18:53 ` joseph at codesourcery dot com
2010-12-13 19:03 ` dominiq at lps dot ens.fr
2010-12-13 19:05 ` dominiq at lps dot ens.fr
2010-12-13 19:09 ` iains at gcc dot gnu.org
2010-12-13 19:23 ` dominiq at lps dot ens.fr
2010-12-13 20:06 ` iains at gcc dot gnu.org
2010-12-13 20:09 ` iains at gcc dot gnu.org
2010-12-13 20:24 ` iains at gcc dot gnu.org
2010-12-13 21:32 ` joseph at codesourcery dot com
2010-12-14 11:55 ` iains at gcc dot gnu.org
2010-12-14 12:58 ` iains at gcc dot gnu.org
2010-12-14 13:41 ` iains at gcc dot gnu.org
2010-12-14 14:35 ` iains at gcc dot gnu.org
2010-12-16 14:38 ` rguenth at gcc dot gnu.org
2010-12-16 22:08 ` mrs at gcc dot gnu.org
2011-01-09 13:02 ` iains at gcc dot gnu.org
2011-01-09 13:09 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).