Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Windows error 14 "Out of memory" mapping to Posix EFAULT "Bad address in system call argument" feels wrong

Closed / Fixedfab92486a1b05ba6f7cfe8677da95b9efb3beff0Created 9 years agoUpdated 9 years ago
Descriptionwiki2017-09-15 06:15:07
When loading a dll, I got the error "Bad address in system call argument".

The DLL was wrong (probably name mangled Init procedure) and it is platform WIN CE 6.5 (etcl 1.0.1), so real source is not available. Source code inspection on tcl8.5.6 tells about a failed "LoadLibrary" windows system call. The windows failure code is translated to a posix error.

When looking into "tcl8.7a1/win/tclWinError.c", this error may be caused by two windows errors:

EFAULT,	/* ERROR_OUT_OF_MEMORY		14 */
EFAULT,	/* ERROR_PROTECTION_VIOLATION	115 */

Lets focus on error code 14 "ERROR_OUTOFMEMORY": The description is "Not enough storage is available to complete this operation.". (https://msdn.microsoft.com/en-us/library/cc231199.aspx)

I suppose, error 14 should be mapped to Posix "ENOMEM" with the message "not enough memory".

Anyway, I am not at all sure, but here is a ticket to discuss, forget or merge.

Thank you all, Harald

Referenced by2
oehharwiki2017-09-15 13:30:46

I am now quite certain, that the issue is a lack of memory.

jan.nijtmansplain2017-11-17 15:31:06
Fixed now on all active branches. Thanks!
Log in (anonymous is fine) to add a comment.