View Issue Details

IDProjectCategoryView StatusLast Update
0031725RunnerWindows (YYC)Public2020-07-13 14:57
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
Status ResolvedResolutionFixed 
PlatformWindowsOSWindows 10 ProOS Version>=18362
Product Version2.2.5 
Target Version2.3.0Fixed in Version2.3.0 
Summary0031725: YYC: Arguments now being passed by-reference introduces unexpected behaviour
DescriptionGML:
function destroy_squirrel(squirrel) {
    show_debug_message("DESTROYING SQUIRREL "+string(squirrel));
    if (global.event_squirrel == squirrel) global.event_squirrel = -1;
    show_debug_message("DELETING SQUIRREL "+string(squirrel));
}
function scr_a_bug(){
    global.event_squirrel = 0;
    destroy_squirrel(global.event_squirrel);
}

VM output:
DESTROYING SQUIRREL 0
DELETING SQUIRREL 0

YYC output:
DESTROYING SQUIRREL 0
DELETING SQUIRREL -1

As you can see, since the global is passed by-ref rather than by-value, YYC experiences seemingly impossible behaviour with argument value not matching what was passed after modifying the original value.
Additional InformationI'm not actually sure how this is best approached without reverting the optimization.

Happens in 2.2.5 too.
Tagsyyc
1.4 Found In
2.x Runtime Found In9.9.1.1824
2.x Runtime Verified In

Activities

YellowAfterlife

2020-06-19 19:50

Developer  

a_bug_byref_mut.yyz (9,261 bytes)

Russell Kay

2020-06-30 12:05

Manager   ~0065628

Fixed in gitlab