Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6642405
Votes 0
Synopsis src/share/instrument/JPLISAgent.c line 286: "==" found where assignment "=" expected
Category java:serviceability
Reported Against
Release Fixed 7(b26)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 16-DEC-2007
Description
Running lint on the make/java/instrument code:

cd <your workspace>/jdk/make/java/instrument
gmake lint.clean
gmake lint.errors

  [...]
/devtools/sparc/SUNWspro/SS11/bin/lint  -errsecurity=core -errhdr=%user -v -x  -u -errfmt=simple  -Xarch=v8   -DTRIMMED -DNO_JPLIS_LOGGING -Dsparc -D__solaris__ -D_REENTRANT  -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS -I. -I../../../build/solaris-sparc/tmp/sun/sun.instrument/instrument/CClassHeaders -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export -I../../../src/share/javavm/include -I../../../src/solaris/javavm/include -I../../../src/share/instrument -I../../../src/solaris/instrument -I../../../src/solaris/native/java/io -I../../../src/share/bin -I../../../src/solaris/bin -I../../../src/share/native/common -I../../../src/solaris/native/common -I../../../src/share/native/sun/instrument -I../../../src/solaris/native/sun/instrument    -dirout=../../../build/solaris-sparc/tmp/sun/sun.instrument/instrument/obj -c ../../../src/share/instrument/JPLISAgent.c
illegal option -Xarch=v8
"../../../src/share/instrument/JPLISAgent.c", line 286 [16]: warning: expression, or sub-expression, has null effect
"../../../src/share/instrument/JPLISAgent.c", line 286 [16]: warning: equality operator "==" found where assignment "=" expected



   277      jvmtierror = (*jvmtienv)->SetEnvironmentLocalStorage(
   278                                              jvmtienv,
   279                                              &(agent->mNormalEnvironment));
   280      jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
   281
   282      /* check what capabilities are available */
   283      checkCapabilities(agent);
   284
   285      /* check phase - if live phase then we don't need the VMInit event */
   286      jvmtierror == (*jvmtienv)->GetPhase(jvmtienv, &phase);
   287      jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
   288      if (phase == JVMTI_PHASE_LIVE) {
   289          return JPLIS_INIT_ERROR_NONE;
   290      }
   291
   292      /* now turn on the VMInit event */
   293      if ( jvmtierror == JVMTI_ERROR_NONE ) {
   294          jvmtiEventCallbacks callbacks;

Statement 286 should be an assignment.
The assert at 287 is not checking the results of the GetPhase() call.
The code works most of the time because GetPhase() is successful and sets &phase as a side-effect.
Posted Date : 2007-12-16 19:04:28.0
Work Around
N/A
Evaluation
I took a quick look at src/share/instrument/JPLISAgent.c:

D 1.35 07/10/17 12:31:56 ohair 45 44    00171/00171/01291
MRs:
COMMENTS:
6616089: Whitespace cleanup on all sources

and the errant line 286 is still there.
Posted Date : 2008-01-31 22:41:15.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang