The problem is UPC2C has promoted the two block-scoped static shared variables
(I) to global scope (in order to allow allocation from a different function at
startup), but has not mangled the names to ensure uniqueness. Consequently, the
shared variables which were separate in UPC now name-collide with each other
and a similarly-named variable at global scope, resulting in all three
variables aliased to the same shared space. Small changes to the declarations
in the test (eg adding a definite blocksize to one of the I declarations)
results in backend type mismatch errors from the duplicate declarations.
This miscompilation and resulting incorrect aliasing leads to interference
between most of the test modules in atomic_test and memory corruption due to
accessing beyond the end of differently-sized objects.
I don't know the release schedule for UPC2C, but this seems like a blocker.
OOPS - this is a duplicate of an already-resolved issue.
Sorry for being a step behind - I am recovering from a 10-day email backlog due to vacation.
-Paul
Copied from Dan Bonachea's report in the Berkeley UPC Bugzilla (https://upc-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3216):
UPC2C is miscompiling atomic_test on all platforms. The core problem is demonstrated in the following test program:
trans_bupc passes the test. UPC2C fails:
The relevant generated code:
The problem is UPC2C has promoted the two block-scoped static shared variables (I) to global scope (in order to allow allocation from a different function at startup), but has not mangled the names to ensure uniqueness. Consequently, the shared variables which were separate in UPC now name-collide with each other and a similarly-named variable at global scope, resulting in all three variables aliased to the same shared space. Small changes to the declarations in the test (eg adding a definite blocksize to one of the I declarations) results in backend type mismatch errors from the duplicate declarations.
This miscompilation and resulting incorrect aliasing leads to interference between most of the test modules in atomic_test and memory corruption due to accessing beyond the end of differently-sized objects.
I don't know the release schedule for UPC2C, but this seems like a blocker.