Skip to content

Fix issue #148: Null-Pointer Dereference in test_app#286

Merged
jbdelcuv merged 2 commits into
mainfrom
personal/jbdelcuv/fix_issue_148
Apr 13, 2026
Merged

Fix issue #148: Null-Pointer Dereference in test_app#286
jbdelcuv merged 2 commits into
mainfrom
personal/jbdelcuv/fix_issue_148

Conversation

@jbdelcuv
Copy link
Copy Markdown
Contributor

Fix for issue #148: Don't call function pointer "func" if it isn't initialized.

Signed-off-by: Juan del Cuvillo <juan.b.del.cuvillo@intel.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #148 by preventing a null-pointer dereference in the SGX enclave thread test when new_thread_func() runs before the global thread function pointer (func) has been initialized.

Changes:

  • Add a NULL check for the global function pointer func in new_thread_func().
  • Log an error and return early if func is not initialized.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Linux/sgx/test_app/enclave/tests/threadstest.c
Comment thread Linux/sgx/test_app/enclave/tests/threadstest.c Outdated
Signed-off-by: Juan del Cuvillo <juan.b.del.cuvillo@intel.com>
@jbdelcuv jbdelcuv merged commit 08b885f into main Apr 13, 2026
3 checks passed
@jbdelcuv jbdelcuv deleted the personal/jbdelcuv/fix_issue_148 branch April 13, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants