Dyalog / qSE

Initialisation of ⎕SE, including source code that ends up somewhere in ⎕SE, and code to get it there.
https://help.dyalog.com/latest/#UserGuide/The%20APL%20Environment/Session%20Initialisation.htm
MIT License
4 stars 0 forks source link

The change in 393255a leads to infinite recursion in repObj when ]save is called on a workspace with a train in an unscripted namespace #11

Open dyaandys opened 4 months ago

dyaandys commented 4 months ago

Mantis 14223 details that you get the message "generating a faulty script" when attempting to ]save a workspace which contains a train inside an unscripted namespace: n←⎕ns'' n.t←'+',⊢ ]save n /tmp/

With the change in 393255a the ]save now leads to infinite recursion in repObj:

⎕SE.SALT.NStoScript.repObj[35]* .. a very large number of this line .. ⎕SE.SALT.NStoScript.repObj[35] ⎕SE.SALT.NStoScript.repObj[13] ⎕SE.SALT.NStoScript.ntgennscode[40] ⎕SE.SALT.Save[181] ⍎ [#] ⎕SE.input.c.SaltInSpice.Run[6] ⍎ ⎕SE.SALTUtils.CallUserCode[0] ⎕SE.UCMD[2]

repObj[35] is len<≢obj:P⍣rc⊢(⍕s),'⍴',0 ref ∇ obj⍴⍨len~1

Dyalog 20.0.49906 64-bit Unicode, BuildID 242f24f7 OS AIX 2 7 IBM,9009-41A Link 4.0.18 SALT 2.915 UCMD 2.6 .NET WS 20.0 Tatin (unavailable) Cider (unavailable)