MATLAB: Does calling ‘mexErrMsgTxt’ in the MEX-file on Linux cause MATLAB to close unexpectedly

2.3.2glibclinuxMATLABmexmexerrmsgtxt

When I create a MEX-file from the following code, which I have saved as "errortest":
#include <mex.h>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray* prhs[])
{
mexErrMsgTxt("Error message");
}
using:
mex errortest
and run the MEX-file in MATLAB 7.0 (R14) on my Linux machine, the MATLAB session closes without errors or a crash dump.

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This behavior appears to arise as a result of an incompatibility between glibc version 2.3.2 and MATLAB 7.0 (R14).
Note that MATLAB is supported on Linux distributions built with the 2.4.x kernel and glibc (glibc6) 2.2.5. See the following web page for information on supported versions:
Updating several MATLAB libraries as described in the following solution should resolve this issue: