Steps to reproduce:
1. Run tar xzf azureus-reduced-testcase.tar.gz
2. Set CLASSPATH to point to glibj.zip of gnu classpath
3. Run jikes org/gudy/azureus2/plugins/PluginInterface.java
Excected results:
3. jikes should print errors and warnings but not crash
Actual results:
3. jikes prints errors and warnings but also crashes. Full output is:
Found 1 semantic error compiling "org/gudy/azureus2/plugins/PluginInterface.java":
3. public void addView(PluginView view);
^--------^
*** Semantic Error: Type "org.gudy.azureus2.plugins.PluginView" was not found.
Found 4 semantic errors compiling "org/gudy/azureus2/ui/swt/Tab.java":
3. public Tab(IView _view) {
^---^
*** Semantic Error: Type "IView" was not found.
4. if (!(_view instanceof MyTorrentsSuperView || _view instanceof MyTrackerView || _view instanceof MySharesView )) {
^-----------------^
*** Semantic Error: A candidate for type "MyTorrentsSuperView" was found, but it is invalid and needs to be fixed before this type will successfully compile.
4. if (!(_view instanceof MyTorrentsSuperView || _view instanceof MyTrackerView || _view instanceof MySharesView )) {
^-----------^
*** Semantic Error: Type "org.gudy.azureus2.ui.swt.views.MyTrackerView" was not found.
4. if (!(_view instanceof MyTorrentsSuperView || _view instanceof MyTrackerView || _view instanceof MySharesView )) {
^----------^
*** Semantic Error: Type "MySharesView" was not found.
Found 2 semantic errors compiling "org/gudy/azureus2/ui/swt/views/MyTorrentsSuperView.java":
2. public class MyTorrentsSuperView extends AbstractIView {
^-----------^
*** Semantic Error: Type "AbstractIView" was not found.
3. private MyTorrentsView torrentview;
^------------^
*** Semantic Error: Type "org.gudy.azureus2.ui.swt.views.MyTorrentsView" was not found.
Found 16 semantic errors compiling "org/gudy/azureus2/ui/swt/views/MyTorrentsView.java":
4. table.addSelectionListener(new SelectionAdapter() {
^--------------^
*** Semantic Error: Type "SelectionAdapter" was not found.
5. public void widgetDefaultSelected(SelectionEvent e) {
^------------^
*** Semantic Error: Type "SelectionEvent" was not found.
6. if (hasSelection) {
^----------^
*** Semantic Error: No accessible field named "hasSelection" was found in type "MyTorrentsView$1".
7. menuItemChangeDir.addListener(SWT.Selection, new Listener() {
^-^
*** Semantic Error: No accessible field named "SWT" was found in type "MyTorrentsView$1".
7. menuItemChangeDir.addListener(SWT.Selection, new Listener() {
^------^
*** Semantic Error: Type "Listener" was not found.
12. itemQueue.addListener(SWT.Selection, new Listener() {
^-^
*** Semantic Error: No accessible field named "SWT" was found in type "MyTorrentsView".
12. itemQueue.addListener(SWT.Selection, new Listener() {
^------^
*** Semantic Error: Type "Listener" was not found.
14. itemStop.addListener(SWT.Selection, new Listener() {
^-^
*** Semantic Error: No accessible field named "SWT" was found in type "MyTorrentsView".
14. itemStop.addListener(SWT.Selection, new Listener() {
^------^
*** Semantic Error: Type "Listener" was not found.
16. itemRemove.addListener(SWT.Selection,
^-^
*** Semantic Error: No accessible field named "SWT" was found in type "MyTorrentsView".
17. new SelectedTableRowsListener() {
^-----------------------^
*** Semantic Error: Type "SelectedTableRowsListener" was not found.
19. itemDeleteTorrent.addListener(SWT.Selection,
^-^
*** Semantic Error: No accessible field named "SWT" was found in type "MyTorrentsView".
20. new SelectedTableRowsListener() {
^-----------------------^
*** Semantic Error: Type "SelectedTableRowsListener" was not found.
22. Arrays.sort(dataSources, new Comparator() {
^---------^
*** Semantic Error: No accessible field named "dataSources" was found in type "MyTorrentsView".
22. Arrays.sort(dataSources, new Comparator() {
^--------^
*** Semantic Error: Type "Comparator" was not found.
25. new AERunnable()
^--------^
*** Semantic Error: Type "AERunnable" was not found.
Segmentation fault (core dumped)
Backtrace:
$ gdb ~/opt/jikes-cvs20050729-debug/bin/jikes -c core.9640
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `/home/lindi/opt/jikes-cvs20050729-debug/bin/jikes org/gudy/azureus2/plugins/Plu'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0 0x08066a26 in ShadowSymbol::Identity (this=0x8fd44f0) at set.h:28
28 inline const NameSymbol* Identity() { return symbol -> Identity(); }
(gdb) bt
#0 0x08066a26 in ShadowSymbol::Identity (this=0x8fd44f0) at set.h:28
#1 0x0806681e in SymbolSet::AddElement (this=0x8e50118, element=0x8fd0228) at set.h:238
#2 0x080e99c1 in Semantic::GetAnonymousType (this=0x8fc5e58, class_creation=0x8ffd8ac, super_type=0x8e509f8) at expr.cpp:3912
#3 0x080e9f30 in Semantic::ProcessClassCreationExpression (this=0x8fc5e58, expr=0x8ffd8ac) at expr.cpp:4079
#4 0x08065ed6 in Semantic::ProcessExpression (this=0x8fc5e58, expr=0x8ffd8ac) at semantic.h:1233
#5 0x080e54e1 in Semantic::ProcessExpressionOrStringConstant (this=0x8fc5e58, expr=0x8ffd8ac) at expr.cpp:2017
#6 0x080e7be4 in Semantic::ProcessArguments (this=0x8fc5e58, args=0x8ffd8dc) at expr.cpp:3195
#7 0x080e7cba in Semantic::ProcessMethodInvocation (this=0x8fc5e58, expr=0x8ffd910) at expr.cpp:3218
#8 0x08065ed6 in Semantic::ProcessExpression (this=0x8fc5e58, expr=0x8ffd910) at semantic.h:1233
#9 0x0805f2a9 in Semantic::ProcessExpressionStatement (this=0x8fc5e58, stmt=0x8ffd938) at body.cpp:318
#10 0x08064f14 in Semantic::ProcessStatement (this=0x8fc5e58, stmt=0x8ffd938) at semantic.h:1225
#11 0x0805e9bb in Semantic::ProcessBlockStatements (this=0x8fc5e58, block_body=0x8ffd950) at body.cpp:43
#12 0x08063dba in Semantic::ProcessMethodBody (this=0x8fc5e58, method_declaration=0x8fff62c) at body.cpp:2356
#13 0x08064a29 in Semantic::ProcessExecutableBodies (this=0x8fc5e58, class_body=0x8fff6d0) at body.cpp:2628
#14 0x081294a8 in TypeSymbol::ProcessExecutableBodies (this=0x8ff6700) at symbol.cpp:286
#15 0x080a9a15 in Control::ProcessBodies (this=0x8e315f0, type=0x8ff6700) at control.cpp:1376
#16 0x080a9327 in Control::ProcessFile (this=0x8e315f0, file_symbol=0x8fbf3f0) at control.cpp:1185
#17 0x080a62e0 in Control (this=0x8e315f0, arguments=0x8e315a8, option_=@0x8e31270) at control.cpp:352
#18 0x08100df4 in JikesAPI::compile (this=0x8e31218, filenames=0x8e315a8) at jikesapi.cpp:211
#19 0x08100359 in main (argc=2, argv=0xbfe43594) at jikes.cpp:116
Version info:
jikes 1.22 and jikes cvs head from 2005-07-29
gnu classpath cvs heads from 2005-06-14 and 2005-07-25T143930+0000
Fedora Core 3 with linux "2.6.11-1.35_FC3"
GNU C Library stable release version 2.3.5, by Roland McGrath et al.
/usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.3
Notes:
Azureus (bittorrent client, azureus.sourceforge.net) source code is some 230000 lines. The reduced testcase was created with a script that by trial and error tried to remove only lines that don't affect the segfault. The testcase still contains multiple files but the total number of lines is just 62. I hope this counts as a reduced testcase as I'm unable to figure out how to further reduce it.
Contact info:
Mail me at timo.lindfors@iki.fi or just add comments to this bug (I have sourceforge account so I get comments by mail). Don't hesitate to ask if you need more info about this bug.
testcase reduced from azureus to reproduce the bug