Skip to content

Missing race warning in comma operator #2387

Backlog

Description

@jprotopopov-ut

Goblint (revision 17d08e4c8) does not produce race warning for the following program:

#include <pthread.h>
int target, padding;
void *reader(void *arg) {
    padding = ((void)*(volatile int *)&target, 5);
    return 0;
}
int main(void) {
    pthread_t t;
    pthread_create(&t, 0, reader, 0);
    target = 42;
    pthread_join(t, 0);
}

Activity

  1. added theissue type on Nov 30, 2026
  2. sim642 commented on Nov 30, 2026

    @sim642
    Member

    That access is hidden from Goblint because it has no side effects.
    This is one thing that goblint/cil#232 aims to fix.

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions