swtv-kaist / MUSIC

MUSIC: MUtation analySIs tool with High Configurability and Extensibility
Other
17 stars 6 forks source link

Segmentation fault when function declaration begins at start of source file #4

Open JonathanFoo0523 opened 2 months ago

JonathanFoo0523 commented 2 months ago

Applying MUSIC to program

int main(void) {
  return 0;
}

results in segmentation fault.

I believe this occurs when the first function declaration coincides with the start of the source file (1:1). MUSIC fails to identify the start of a new declaration during the check here, fails to initialize the return statement list here, and subsequently triggers a segmentation fault when modifying the last element of the empty return statement list here