[ruby-dev:49913] [Ruby trunk Bug#13066] 2.4.0-rc1, VC14, Segmentation fault on RSS::TestRSS10Core#test_to_xml

From: yasmise@...
Date: 2016-12-24 11:28:03 UTC
List: ruby-dev #49913
Issue #13066 has been updated by y mise.

File segfault_new-timec.txt added
File fatal_new-timec_mod.txt added
ruby -v set to ruby 2.4.0rc1 (2016-12-12 trunk 57064) [x64-mswin64_140]

I tried test-all with time.c which has debug code. Error messages are attached.
I did followings (step 1--8 is same as I wrote above):
 
9) update time.c to r57157. Other files are not updated.
10) do test-all repeatedly, and I got segfault. See "segfault_new-timec.txt".
11) It seems like segfault happens outside try-except, so I changed time.c as follows.

`
value_insane_p(VALUE x)
{
    VALUE klass;
    LPEXCEPTION_POINTERS info;
    void *failed_address = 0;
    __try {
        if (SPECIAL_CONST_P(x)) return 0; // this line was outside of __try{}
        if (!RBASIC_CLASS(x)) return (void *)x; // this line was outside of __try{}
        RB_GC_GUARD(klass) = RBASIC_CLASS(x);
    }
`

12) do test-all repeatedly, and I got test error. See "fatal_new-timec_mod.txt".

----------------------------------------
Bug #13066: 2.4.0-rc1, VC14, Segmentation fault on RSS::TestRSS10Core#test_to_xml
https://bugs.ruby-lang.org/issues/13066#change-62226

* Author: y mise
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0rc1 (2016-12-12 trunk 57064) [x64-mswin64_140]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
I read Mr. Nakada's tweet (https://twitter.com/n0kada/status/811156759611965441), so I tried and got segmentation fault. Please see attached file.
What I did was:

1. extract ruby-2.4.0-rc1.tar.xz
2. apply r57079 (fix link error with VC14) manually
3. win32\configure.bat --prefix=c:/ruby --disable-rubygems --disable-install-doc
4. nmake
5. delete other test files, now, "test" folder only contains "lib", "rss" and "runner.rb"
6. nmake test-all
7. if test passed, close and restart command prompt, and nmake test-all again
8. segmentation fault happened after around 5 times trial

---Files--------------------------------
segfault_57079applied.txt (25.8 KB)
segfault_new-timec.txt (26.2 KB)
fatal_new-timec_mod.txt (2.09 KB)


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

In This Thread

Prev Next