This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
Pointer-to-local variable probably doesn't follow correct semantics #217
Labels
Implementation
Does not affect the specification
Migrated from https://bugs.webkit.org/show_bug.cgi?id=179245
Imagine the following
thread int* foo(int x) {
int y = x;
return &y;
}
fragment void bar() {
thread int* z = foo(6);
*z = 7;
foo(8);
// Now, *z should equal 8.
}
Our instantiation will currently create a copy of foo() at the two call sites, thereby leading to two distinct "y" variables. This probably means the above doesn't lead to the correct result.
The text was updated successfully, but these errors were encountered: