[Gambas-bugtracker] Bug #1747: auto string to num conversion cause jit to crash
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Mon Mar 9 17:31:43 CET 2020
http://gambaswiki.org/bugtracker/edit?object=BUG.1747&from=L21haW4-
Brian G reported a new bug.
Summary
-------
auto string to num conversion cause jit to crash
Type : Bug
Priority : High
Gambas version : Master
Product : JIT compiler
Description
-----------
when using auto conversion of string to number, string+string works fine but -string is invalid not detected til run time
but if one is using fast then the jit crashes at compile time:
this script demonstrates the error
#!/usr/bin/gbs3
' Gambas Script File Created 03/09/2020 16:28:11.531
Fast
Public i As String = "1"
Public j As String[] = ["-1", "2", "3"]
Public Sub tester(count As Integer)
Print count
End
Public Sub Main()
tester(j[0]) 'this does the conversion auto
Print j[1] + j[2] 'this does the conversion auto
Print -j[0] 'this does not run as its invalid
'but not detected till runtime, but worste it causes the jit to fail
End
System information
------------------
master
More information about the Bugtracker
mailing list