-
Notifications
You must be signed in to change notification settings - Fork 3k
Protect local static object construction in ARMCC #5635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The test for construction of local static objects doesn't check to see if the object returned has been fully initialized. Because of this, an error with ARMCC was not detected. This patch adds an assert to the race_test to ensure that the object has been properly initialized.
/morph build |
@theotherjimmy does anything special need to be done for ARMC6? |
You need to add: #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
or similar for armc6 to pick up the block. |
@theotherjimmy This is already present:
|
@c1728p9 Yeah, I saw that. You don't have anything related to |
Implement the functions __cxa_guard_acquire, __cxa_guard_release and __cxa_guard_abort for ARMCC so local static object construction is thread safe.
9f0d622
to
c63a627
Compare
My bad. I updated the PR to add it. |
/morph build |
Build : SUCCESSBuild number : 644 Triggering tests/morph test |
Test : SUCCESSBuild number : 466 |
Exporter Build : SUCCESSBuild number : 283 |
Implement the functions __cxa_guard_acquire, __cxa_guard_release and __cxa_guard_abort for ARMCC so local static object construction is thread safe. Also update the race test to properly detect this bug.