View Issue Details

IDProjectCategoryView StatusLast Update
0030382RunnerFunctionsPublic2019-07-23 17:02
ReporterStewart BishopAssigned ToCoreTech 
PriorityLowSeverityC - GeneralReproducibility100%
Status AssignedResolutionOpen 
Product Version2.2.1 
Target VersionFixed in Version 
Summary0030382: Functions: Stack overflow occurs when using base64_encode() on a string greater than roughly length 775,000
DescriptionIf you try to use base64_encode() on a string that is sufficiently long, the game crashes (silently in YYC and with a popup message saying "Stack overflow..." in VM). The string length that this occurs at is somewhere between 774,000 and 775,000. I have attached a project that illustrates this issue. It creates a string of length 774,000 or 775,000 and attempts to run base64_encode() on the string. If the string is length 774,000 it will not crash, but if it is length 775,000 it will crash.

It looks like the longest string length that base64_encode() can handle without crashing is a little different between VM and YYC. I am seeing some crashing at string length 774000 when using YYC, whereas it has to be length 775000 to crash when using VM.
Steps To Reproduce1) Run the project
TagsRunner
1.4 Found In
2.x Runtime Found In2.2.2.293
2.x Runtime Verified In

Activities

Stewart Bishop

2019-01-08 13:03

Developer  

base64_encode_crash.zip (15,242 bytes)

Russell Kay

2019-05-07 10:47

Manager   ~0063824

This also happens with md5_string_unicode, md5_string_utf8(), base64_decode and sha1_string_unicode so potentially a more generic fix.