ID:2763239
 
Resolved
Regression in 514.1576: the spantext() family of procs all compiled incorrectly.
BYOND Version:514
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 97.0.4692.99
Applies to:Dream Maker
Status: Resolved (514.1578)

This issue has been resolved.
Descriptive Problem Summary:
It looks like code containing `spantext_char` can lead to the VM's stack being over-popped.

Numbered Steps to Reproduce Problem:
Run this code on 514.1577 (latest)

Code Snippet (if applicable) to Reproduce Problem:
/world/New()
test()

/proc/test()
if (spantext_char("a", "b", -3))
return 1
return 0


Notice the double SpanTextChar (my own name) instruction in the following disassembly:

#dis /proc/test
0000: 00000084 0000019F DbgFile "spantest_char_crash.dm"
0002: 00000085 00000018 DbgLine 24
0004: 00000060 00000006 000000F7 PushVal "a"
0007: 00000060 00000006 000000F8 PushVal "b"
000A: 00000060 0000002A 0000C040 PushVal -3
00000000
000E: 00000155 SpanTextChar
000F: 00000155 SpanTextChar
0010: 0000000D Test
0011: 00000011 00000018 Jz LAB_0018
0013: 00000085 00000019 DbgLine 25
0015: 00000050 00000001 PushInt 1
0017: 00000012 Ret
LAB_0018:
0018: 00000085 0000001A DbgLine 26
001A: 00000050 00000000 PushInt 0
001C: 00000012 Ret


Does the problem occur:
Every time? Or how often?
100% of the time, every time

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
514.1576 also crashes. 514.1575 does not.


Lummox JR resolved issue with message:
Regression in 514.1576: the spantext() family of procs all compiled incorrectly.
Doh! Stupid typos strike again.