Article ID: 000090622 Content Type: Error Messages Last Reviewed: 10/28/2022

Error: “Segmentation Fault (Core Dumped)” When Passing Large Array to Enclave in Intel® Software Guard Extensions (Intel® SGX)

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

How to adjust enclave configurations to pass large arrays to an enclave.

Description
  • Attempted to pass a very large array to an enclave via an ecall.
  • Received error: Segmentation fault (core dumped)
  • Decreased size of array and was able to successfully pass it to the enclave.
Resolution

There is not enough memory allocated to the enclave to pass a large array.

In the Enclave Configuration File, enclave.config.xml, increase the amount of heap memory allocated to the enclave:

  • Increase HeapInitSize
  • In a platform with SGX 2, adjust HeapMinSize and HeapMaxSize
  • Reduce TCSNUM, if possible since more threads will require more memory.
Additional information

Use the Enclave Memory Measurement Tool to measure the memory of your enclave so you can set Heap size accordingly. More threads will require more memory.

Refer to the Intel® SGX Developer Reference Guide for your OS for more information on setting the parameters in the Enclave Configuration File.

Related Products

This article applies to 1 products