intel / intel/confidential-computing.sgx.sdk
s_enclave_elrange_map destructor is invalid
- Dominant language
- C++
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
In sdk/simulation/urtssim/enclave_creator_sim.cpp the declared destructor procedure is not guaranteed to run after std::map::~map due to the semantics of static objects. The value type is trivially copyable and destructible, so it doesn't need to be heap-allocated to begin with.
Contributor guide
Research direction
Start in sdk/simulation/urtssim/enclave_creator_sim.cpp and inspect the declaration and cleanup of s_enclave_elrange_map. Confirm how its current allocation interacts with std::map destruction, then make the storage and lifetime match the value type's trivial copy and destruction properties. Verify the simulator still builds and its relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100