TCC/LE x64 no longer works with Windows 10 Insider Preview Build 17063

#1
Actually, this started a couple of builds ago...

When I try to run TCC LE x64 V14 I get this:

tcc.exe - Application error
The application was unable to start correctly (0x0000017)
Click OK to close the application

And - yes, I uninstalled and reinstalled the application.

TCC/LE x86 still works...
 

rconn

Administrator
Staff member
May 14, 2008
10,415
95
#2
It's a Windows 10 / 17063 loader bug. If the executable isn't marked LARGEADDRESSAWARE:YES, then the loader fails with an out of memory error. (No TCC code is never executed.)

Newer versions of TCC have that flag set, so they don't get the error. 32-bit versions of TCC don't have the flag set, but they also work.
 

rconn

Administrator
Staff member
May 14, 2008
10,415
95
#6
Does setting the bit actually make the program large address aware? Or is this a hack which will cause issues?
The Windows 10 bug only affects x64 apps. And checking that flag for an x64 app is normally pointless, because x64 apps are always large address aware. That bit is for 32-bit apps (to give them a 4Gb address space in x64 Windows); the bug in the beta Win10 builds mistakenly applies it to x64 apps.

Setting the flag won't magically allow your x86 apps to go from 2Gb to 4Gb. Unless the app knows how to use pointers in the 2Gb to 4Gb range, you can make it go boom by setting LARGEADDRESSAWARE.
 
#7
The Windows 10 bug only affects x64 apps. And checking that flag for an x64 app is normally pointless, because x64 apps are always large address aware. That bit is for 32-bit apps (to give them a 4Gb address space in x64 Windows); the bug in the beta Win10 builds mistakenly applies it to x64 apps.

Setting the flag won't magically allow your x86 apps to go from 2Gb to 4Gb. Unless the app knows how to use pointers in the 2Gb to 4Gb range, you can make it go boom by setting LARGEADDRESSAWARE.
Right. But setting the bit on the x64 version allows Windows to launch the program, so I assume it would function properly. So far, it has worked fine. Actually, nothing I do requires 64 bit addressing; I've always just assumed that the x64 version would have better performance on a 64 bit operating system. Maybe it's wishful thinking.