Skip to content

Is the mechanism to ensure effect safety is flow-insensitive ? #147

Description

@Absoler

csmith may generate this code:

int g_1;
int g_2;
int g_3[1]={ 0};
int* g_4 = &g_1;

……

for( int i=0; i<=2; i++){
g_3[g_2] = (*g_4)++;
g_4 = &g_2;
}

There is no problem until the second round, where *g_4 = g_2, and "g_3[g_2] = g_2++;" doesn't satisfy effect safety. But when generate this statement, we didn't know g_4 would point to g_2 in the future, and in Block::post_creation_analysis, it seems also no consideration of this situation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions