Issue #15396 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.4: UNKNOWN, 2.5: REQUIRED to 2.4: UNKNOWN, 2.5: DONE

ruby_2_5 r66309 merged revision(s) 62621.

----------------------------------------
Bug #15396: Please backport r62621 for LLP64 environment
https://bugs.ruby-lang.org/issues/15396#change-75550

* Author: wanabe (_ wanabe)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.4p122 (2018-12-09 revision 66298) [x64-mswin64_140]
* Backport: 2.4: UNKNOWN, 2.5: DONE
----------------------------------------
Sometimes ruby 2.5.4 occurs SEGV on mswin64.
https://ci.appveyor.com/project/ruby/ruby/builds/20707563


It can be reproduced on my environment.

```
C:\ruby>miniruby.exe -v -e 'RubyVM::InstructionSequence.compile("[]<</1/").to_binary'
ruby 2.5.4p122 (2018-12-09 revision 66298) [x64-mswin64_140]
-e:1: [BUG] Segmentation fault
ruby 2.5.4p122 (2018-12-09 revision 66298) [x64-mswin64_140]
(snip)
```

And this SEGV can be resolved with r62621.

```
C:\ruby>miniruby -e 'h=`git log origin/trunk --grep=@62621 --format=%H -1`; p h;system("git cherry-pick #{h}")'
"b001766b080a3572a7fae94aa0b8ab0b0a0f3ee2\n"
[ruby_2_5 f54400618a] compile.c: do not truncate VALUE to long
 Author: nobu <nobu / b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
 Date: Thu Mar 1 07:59:57 2018 +0000
 1 file changed, 2 insertions(+), 2 deletions(-)

C:\ruby>nmake miniruby && miniruby.exe -v -e 'RubyVM::InstructionSequence.compile("[]<</1/").to_binary'

Microsoft (R) Program Maintenance Utility Version 14.16.27024.1
Copyright (C) Microsoft Corporation.  All rights reserved.

compiling compile.c
compile.c
user32.lib advapi32.lib shell32.lib ws2_32.lib iphlpapi.lib imagehlp.lib shlwapi.lib
linking miniruby.exe
ruby 2.5.4p122 (2018-12-09 revision 66298) [x64-mswin64_140]
ruby 2.5.4p122 (2018-12-09 revision 66298) [x64-mswin64_140]

```

Would you please backport r62621?



-- 
https://bugs.ruby-lang.org/