You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by Chines Wang <no...@github.com.INVALID> on 2023/03/17 08:51:44 UTC

[apache/incubator-teaclave-sgx-sdk] Modify misuse regarding the use of ordering (PR #424)

[        SIDE_EFFECT.fetch_add(self.0, atomic::Ordering::SeqCst);](https://github.com/apache/incubator-teaclave-sgx-sdk/blob/495b91f6e690a8c7a3b94241ba58eb44cc22739d/sgx_tstd/hashbrown/benches/bench.rs#L56),https://github.com/apache/incubator-teaclave-sgx-sdk/blob/495b91f6e690a8c7a3b94241ba58eb44cc22739d/samplecode/tls/tlsclient/enclave/src/lib.rs#L245,https://github.com/apache/incubator-teaclave-sgx-sdk/blob/495b91f6e690a8c7a3b94241ba58eb44cc22739d/samplecode/tls/tlsserver/enclave/src/lib.rs#L181
I think the use of ordering here is incorrect, AtomicUsize is used here for counting, not to synchronize access to other shared variables. Therefore, only Relaxed needs to be used here to ensure the correctness of the program.
You can view, comment on, or merge this pull request online at:

  https://github.com/apache/incubator-teaclave-sgx-sdk/pull/424

-- Commit Summary --

  * Modified atomic::ordering

-- File Changes --

    M samplecode/tls/tlsclient/enclave/src/lib.rs (2)
    M samplecode/tls/tlsserver/enclave/src/lib.rs (2)
    M sgx_tstd/hashbrown/benches/bench.rs (2)

-- Patch Links --

https://github.com/apache/incubator-teaclave-sgx-sdk/pull/424.patch
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/424.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/424
You are receiving this because you are subscribed to this thread.

Message ID: &lt;apache/incubator-teaclave-sgx-sdk/pull/424@github.com&gt;

Re: [apache/incubator-teaclave-sgx-sdk] Modify misuse regarding the use of ordering (PR #424)

Posted by volcano <no...@github.com.INVALID>.
Merged #424 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/424#event-8846310861
You are receiving this because you are subscribed to this thread.

Message ID: <ap...@github.com>