On Sun, Feb 14, 2021 at 04:34:20PM +0100, Bram Moolenaar wrote:
> This is where it runs into the problem: the size should be zero.
> Since it's OK when the later statements are changed, I suspect that the
> "isn_arg.number" value is overwritten when generating one of the later
> statements. Since this is the first instruction I guess some index is
> zero when filling in a jump position later. Perhaps it only fails on
> s390 because it lays out the union of the struct differently.
s390 is big-endian. On little-endian systems, there was still a
problem. For the endtry that was supposed to be skipped, we're
modifying the previous instruction (newlist). It just happens to cause
a different, undetected failure.
Here's the disassembled code for little-endian:
Test_try_catch_throw
var l = []
0 NEWLIST size 34359738368
1 STORE $0
try
2 TRY catch -> 7, finally -> 3
finally
add(l, 0)
3 LOAD $0
4 PUSHNR 0
5 LISTAPPEND
6 DROP
endtry
7 ENDTRY
if 1
else
try
endtry
endif
8 RETURN 0
> There is one such place added in 8.2.2506, I think it should check for
> the "skip" value. Let me give that a try.
> If that fixes it I do wonder why it doesn't fail on other systems.
> Perhaps because of how the union is laid out (overlapping different
> bytes).
I was about to send a similar patch. That does fix the problem.
Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20210214161216.gb7eh65ae4qbsak3%40localhost.