Project

General

Profile

Actions

Bug #13066

closed

2.4.0-rc1, VC14, Segmentation fault on RSS::TestRSS10Core#test_to_xml

Added by Anonymous over 7 years ago. Updated about 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0rc1 (2016-12-12 trunk 57064) [x64-mswin64_140]
[ruby-dev:49912]

Description

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_57079applied.txt Anonymous, 12/24/2016 03:55 AM
segfault_new-timec.txt (26.2 KB) segfault_new-timec.txt Anonymous, 12/24/2016 11:21 AM
fatal_new-timec_mod.txt (2.09 KB) fatal_new-timec_mod.txt Anonymous, 12/24/2016 11:22 AM

Updated by Anonymous over 7 years ago

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):

  1. update time.c to r57157. Other files are not updated.
  2. do test-all repeatedly, and I got segfault. See "segfault_new-timec.txt".
  3. 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);
    }
  1. do test-all repeatedly, and I got test error. See "fatal_new-timec_mod.txt".

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
Actions #3

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Open to Closed

Applied in changeset r57172.


time.c: fix type of usec2subsecx

  • time.c (usec2subsecx): fix return type, which is a numeric
    object but not a long int. [ruby-dev:49912] [Bug #13066]

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED

Updated by usa (Usaku NAKAMURA) over 7 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED, 2.4: REQUIRED

ruby_2_2 r57225 merged revision(s) 57172.

Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED, 2.4: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: DONE, 2.4: REQUIRED

ruby_2_3 r57567 merged revision(s) 57172.

Updated by naruse (Yui NARUSE) about 7 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: DONE, 2.3: DONE, 2.4: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: DONE, 2.4: DONE

ruby_2_4 r57830 merged revision(s) 57170-57172.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0