AutoHotkey Community

It is currently May 27th, 2012, 12:53 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: August 17th, 2011, 7:40 am 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
I seem to have run into a undocumented limit in the x64 version of AHK L.

Code:
VarSetCapacity(Var1,2147483644,0) ;This works
VarSetCapacity(Var1,2147483645,0) ;This errors out


From the looks of it, variables are limited to 4 bytes under 2 GB (each) - leaving room for a null terminator (a 4 byte integer).

Was this meant to be? I sort of thought that a x64 build would support virtually unlimited sizes per variable.

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 17th, 2011, 12:33 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Code:
if (   new_size > 2147483647 || !(new_mem = (char *)malloc(new_size))   ) // v1.0.44.10: Added a sanity limit of 2 GB so that small negatives like VarSetCapacity(Var, -2) [and perhaps other callers of this function] don't crash.

:lol:
I'll fix it.

(Topic moved from Ask for Help to Bug Reports.)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2011, 1:58 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Fixed in v1.1.02.02.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group