Issue MAXSTRLEN error if length of $query(lvn) exceeds maximum string length
Final Release Note
$query(lvn) issues a MAXSTRLEN error if the length of the result exceeds the maximum string length (1MiB). Previously, such a result could lead to abnormal process termination (e.g. SIG-11). (#25 (closed))
Description
Below is a simple test case that demonstrates the issue. I was able to create strings as big as 2Gb in length and when I tried to go bigger than that I got a SIG-11. But the below test case gets a SIG-11 at lengths even < 2Gb.
ver v63001a p gtm
GTM>set z="1" for i=1:1:16 kill x set x(z,z)="",z=$query(x) write "i = ",i," : zlength(z)=",
zlength(z),!
i = 1 : $zlength(z)=6
i = 2 : $zlength(z)=20
i = 3 : $zlength(z)=56
i = 4 : $zlength(z)=160
i = 5 : $zlength(z)=496
i = 6 : $zlength(z)=1680
i = 7 : $zlength(z)=6096
i = 8 : $zlength(z)=23120
i = 9 : $zlength(z)=89936
i = 10 : $zlength(z)=354640
i = 11 : $zlength(z)=1408336
i = 12 : $zlength(z)=5612880
i = 13 : $zlength(z)=22410576
i = 14 : $zlength(z)=89560400
i = 15 : $zlength(z)=358077776
%GTM-F-KILLBYSIGSINFO1, GT.M process 14774 has been killed by a signal 11 at address 0x00007F49A1E1CCC7 (vaddr 0x000000009BD51000)
%GTM-F-SIGMAPERR, Signal was caused by an address not mapped to an object
Draft Release Note
$query(lvn) issues a MAXSTRLEN error if the length of the string it is about to return exceeds the maximum string length (1MiB). In previous versions of YottaDB, such an out-of-design string returned by $query(lvn) could lead to abnormal process termination (e.g. SIG-11). (#25 (closed))