Difference between revisions of "ChucK/Bugs/Known"

From CSWiki
Jump to: navigation, search
Line 1: Line 1:
 
==Known Bugs in ChucK==
 
==Known Bugs in ChucK==
----
 
  
 
These following have been verified and will be fixed in an upcoming release.
 
These following have been verified and will be fixed in an upcoming release.
 
+
----
 
* multiple declarations in single statement causes crashes/undefined behavior.  Example:
 
* multiple declarations in single statement causes crashes/undefined behavior.  Example:
  
Line 13: Line 12:
 
     // workaround
 
     // workaround
 
     int a; int b;
 
     int a; int b;
 
  
 
* spork a non-static member function causes crashes/undefined behavior.  Example:
 
* spork a non-static member function causes crashes/undefined behavior.  Example:
Line 26: Line 24:
 
     // bug: causes crash and undefined behavior
 
     // bug: causes crash and undefined behavior
 
     spork ~ x.foo();
 
     spork ~ x.foo();
 +
 +
* ++/-- causes incorrect behavior when used inline.  Example:
 +
 +
    // bug
 +
    i++ * y++ => z;
 +
 +
Workaround:  split into multiple statements
 +
 +
* static class variables are initialized incorrectly.  Example:
 +
 +
    class X
 +
    {
 +
        // bug - this is not initialized
 +
        static Object our_object;
 +
    }
 +
 +
Here is a workaround:
 +
 +
    class X
 +
    {
 +
        // declare as reference
 +
        static Object @ our_object;
 +
    }
 +
   
 +
    // initialize outside class
 +
    new Object @=> X.our_object;

Revision as of 21:17, 15 July 2006

Known Bugs in ChucK

These following have been verified and will be fixed in an upcoming release.


  • multiple declarations in single statement causes crashes/undefined behavior. Example:
   // bug: this causes bad things to happen
   int a, b;

Here is a workaround until the bug is fixed:

   // workaround
   int a; int b;
  • spork a non-static member function causes crashes/undefined behavior. Example:
   class X
   {
       void fun foo() { <<< "hi" >>>; }
   }
   
   X x;
   
   // bug: causes crash and undefined behavior
   spork ~ x.foo();
  • ++/-- causes incorrect behavior when used inline. Example:
   // bug
   i++ * y++ => z;

Workaround: split into multiple statements

  • static class variables are initialized incorrectly. Example:
   class X
   {
       // bug - this is not initialized
       static Object our_object;
   }

Here is a workaround:

   class X
   {
       // declare as reference
       static Object @ our_object;
   }
   
   // initialize outside class
   new Object @=> X.our_object;