public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/4366: java class initialization bug
@ 2001-10-28  5:12 green
  0 siblings, 0 replies; 3+ messages in thread
From: green @ 2001-10-28  5:12 UTC (permalink / raw)
  To: apbianco, gcc-bugs, gcc-prs, green, java-prs

Synopsis: java class initialization bug

State-Changed-From-To: feedback->closed
State-Changed-By: green
State-Changed-When: Sun Oct 28 05:12:57 2001
State-Changed-Why:
    Thanks.  Bug fixed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4366&database=gcc


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

* Re: java/4366: java class initialization bug
@ 2001-09-20 21:05 apbianco
  0 siblings, 0 replies; 3+ messages in thread
From: apbianco @ 2001-09-20 21:05 UTC (permalink / raw)
  To: apbianco, gcc-bugs, gcc-prs, green, java-prs, nobody

Synopsis: java class initialization bug

Responsible-Changed-From-To: unassigned->apbianco
Responsible-Changed-By: apbianco
Responsible-Changed-When: Thu Sep 20 21:05:26 2001
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Thu Sep 20 21:05:26 2001
State-Changed-Why:
    I'm attaching a patch.

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=4366&database=gcc


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

* java/4366: java class initialization bug
@ 2001-09-20  1:06 Anthony Green
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony Green @ 2001-09-20  1:06 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4366
>Category:       java
>Synopsis:       java class initialization bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 20 01:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Green
>Release:        3.1 20010919 (experimental)
>Organization:
>Environment:
System: Linux fencer.cygnus.com 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /fencer/cutlass/aph/green/trunk/gcc/configure --prefix=/fencer/cutlass/aph/green/trunk/gcc/i --enable-threads --enable-languages=c++,java : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured) 
>Description:

	I've found a situation where references to static final
strings in other classes isn't forcing a class initialization as it
should.

	The test code below has two classes, Bar and Belle.  Bar contains...

	if (Belle.ASTRING.equals ("Moya"))
	   ...do something...

	This is causing a NullPointerException.  Bell.ATSTRING is null
because Belle's class is never initialized.  The test code also has...
	
	System.out.println (Belle.ASTRING);

	And this _works_ even without initializing Belle because it's
not actually referencing Belle.ASTRING - it's going directly to the
constant table.

	This bug is preventing certain kinds of servlets from running
in Tomcat.


>How-To-Repeat:
Here are two java files and a Makefile...

begin 664 test.tar.gz
M'XL(`&>?J3L``^W636^",!@'<*[V4SSC)`=8>4\P'N9EV<$=YF[+#H55ABO@
M>#$QB]]]1=%MSLP3&I?G=X'0AT(*_[8C5A@SMF!*AZA)J><Y"I7\O6/#\EV%
M^K9KV:9/34_6FXYM*4"[?*FMNJQ8`:#$!>?9'W7'VB_4O`Y%$D$D6%G"2(X$
M^2``[54Y-)4\+/+D!5*69-"?5$62Q<"*N'QZUF1E4PTP69853XV\KHRY+*B$
M+!UQ(;AQ,WE\N+N_U09D79A,]QH,_EXS44)?'>=+IFK:NNQPCVK*JNCU2I6=
M`:S(BIQ[\/Z!S<?H=@8XEG^3>KO\F[;;Y-]W',S_*?S,?_,S')@`IDG&!+39
M;X,+0]A$=H!!O&!C]L:GB>!=/N/H^F_9N_P[IM_DW[5,S/\I,"$""$G/N`X)
M"8-F"[!>#39S@9&37AS-0,\A!%UO]@##9I/PJXJT)P%\+2B[6]LVT*/OK202
KG&4!Z14IZ%/9_[:O<P\)0@@AA!!"""&$$$(((8000@A=I$]+DV\'`"@`````
`
end
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-10-28  5:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-28  5:12 java/4366: java class initialization bug green
  -- strict thread matches above, loose matches on Subject: below --
2001-09-20 21:05 apbianco
2001-09-20  1:06 Anthony Green

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).