You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description:
When multiple variables are declared at the same time, one or more are array variables, unless it's the first variable in the declaration, the array size represented by an expression will be missing in the mutants.
How to recreate the bug:
Write the following code to a file, say "bug.c":
include<stdlib.h>
static void func( int x )
{
int i[4+1], arr[4+1];
if(x==0);
}
void main(int argc, char** argv){
func(0);
}
2. Run Milu to generate mutants on "bug.c", with the default set of operators, but add option "--debug=src":
$ path\to\milu --debug=src bug.c
3. The output will be the original code being parsed and printed without any modification:
include<stdlib.h>
static void func ( int x )
{
int i [ 4 + 1 ] , arr [ ];
if ( x == 0 ) ;
}
;
void main ( int argc , char * * argv )
{
func ( 0 ) ;
}
4. The array size of the second declared variable is missing.
Temporary Solution for users:
Declare array variables separately.
The text was updated successfully, but these errors were encountered:
Hello, I define an int array separately, but the output will drop [ ] and become an int variable. I wonder if you have encountered this problem.Thank you.
Bug description:
When multiple variables are declared at the same time, one or more are array variables, unless it's the first variable in the declaration, the array size represented by an expression will be missing in the mutants.
How to recreate the bug:
include<stdlib.h>
static void func( int x )
{
int i[4+1], arr[4+1];
if(x==0);
}
void main(int argc, char** argv){
func(0);
}
2. Run Milu to generate mutants on "bug.c", with the default set of operators, but add option "--debug=src":
$ path\to\milu --debug=src bug.c
3. The output will be the original code being parsed and printed without any modification:
include<stdlib.h>
static void func ( int x )
{
int i [ 4 + 1 ] , arr [ ];
if ( x == 0 ) ;
}
;
void main ( int argc , char * * argv )
{
func ( 0 ) ;
}
4. The array size of the second declared variable is missing.
Temporary Solution for users:
Declare array variables separately.
The text was updated successfully, but these errors were encountered: