Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Sporadic compiler problems resulting in spurious data flow/control flow related errors.

Hello !

	The development team of your favorite compiler is busy working on
solving
some nasty, sporadic, spurious compiler errors that have started showing up
in the
last couple of months or so. These have been observed in 3.8 M4 build and
some
subsequent ones.

	These are tracked via:

	https://bugs.eclipse.org/bugs/show_bug.cgi?id=372319 and its
duplicate
	https://bugs.eclipse.org/bugs/show_bug.cgi?id=372944

The bug manifests itself in very intermittent and non deterministic fashion
and when
it does rear its ugly head, the compiler issues some patently and blatantly
incorrect
diagnostics such as

(a)
     for (int i= 0; i < fParts.length; i++) {
                                       ^
     The local variable i may not have been initialized

(b)

      switch (c) {
        case '\b' :
        buffer.append("\\b"); // <<----ALL is well here
        break;  // <<<< Bogus Unreachable code error here.
(c)

  public static String getEnabledElementsAsString(ValidatorMetaData[]
elements) {
    StringBuffer buffer = new StringBuffer();
    for (ValidatorMetaData vmd : elements) {
        buffer.append(vmd.getValidatorUniqueName());
        buffer.append(ConfigurationConstants.ELEMENT_SEPARATOR);
    }
    return buffer.toString(); // <<<---- UNREACHABLE CODE ERROR HERE
}

Most of the times, kicking off a rebuild makes the problems go away. We are
looking into
see what sort of concurrency issues could bring about this. We are also
investigating whether
this could be a VM issue to do with JIT compilation and optimization.

If you run into this problem, you are requested to report the incident with
as much details as
possible (JDT/Core version, JVM used to run the JDT, OS/hardware platform
specifics, VM
options used, test case ...) on the bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372319,
so (a) we are able to understand how prevalent (or not) the problem is  (b)
Deduce common
patterns from the different test cases to pinpoint the culprit and resolve
the issue.

Thanks!
Srikanth.



Back to the top