Bug #9739
TestException#test_machine_stackoverflow(_by_define_method) failures on x64-mingw32
Description
I have the following two test failures with x64-mingw32 on Windows 7.
$ gcc -v 2>&1 | tail -n1 gcc version 4.8.2 20130712 (prerelease) (Built by MinGW-builds project) $ make test-all TESTS="-q ruby/test_exception.rb" (snip) [29/43] TestException#test_machine_stackoverflow = 0.05 s 1) Failure: TestException#test_machine_stackoverflow [c:/Users/h.shirosaki/work/ruby/test/ruby/test_exception.rb:537]: pid 2228 killed by SIGSEGV (signal 11) [30/43] TestException#test_machine_stackoverflow_by_define_method = 0.05 s 2) Failure: TestException#test_machine_stackoverflow_by_define_method [c:/Users/h.shirosaki/work/ruby/test/ruby/test_exception.rb:54 8]: pid 8984 killed by SIGSEGV (signal 11) Finished tests in 0.575033s, 74.7783 tests/s, 370.4135 assertions/s. 43 tests, 213 assertions, 2 failures, 0 errors, 0 skips ruby -v: ruby 2.2.0dev (2014-04-13 trunk 45580) [x64-mingw32]
I'm not sure the reason, but setting larger stack size fixes SIGSEGV.
diff --git a/configure.in b/configure.in
index f52e0ba..078f9ba 100644
--- a/configure.in
+++ b/configure.in
@@ -2782,7 +2782,7 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes],
[cygwin*|mingw*], [
: ${LDSHARED='$(CC) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)'}
- XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
+ XLDFLAGS="$XLDFLAGS -Wl,--stack,0x01200000,--enable-auto-import"
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import"
: ${LIBPATHENV=""}
rb_cv_dlopen=yes],
Associated revisions
merge revision(s) r45947,r45951: [Backport #9739] [Backport #9844]
* thread_win32.c (rb_w32_stack_overflow_handler): use Structured Exception Handling by Addvectoredexceptionhandler() for machine stack overflow on mingw. This would be equivalent to the handling using __try and __exept on mswin introduced by r43748. Exception Handling by AddVectoredExceptionHandler() for machine This would be equivalent to the handling using __try and __except
merge revision(s) 43748,45947,45951: [Backport #9739]
* eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of test/ruby/test_exception.rb on Windows. wrap by __try and __exception statements on mswin to raise SIGSEGV when EXCEPTION_STACK_OVERFLOW is occurred, because MSVCRT doesn't handle the exception. however, (1) mingw-gcc doesn't support __try and __exception statements, and (2) we cannot retry SystemStackError after this change yet (maybe crashed) because SEH and longjmp() are too uncongenial. * signal.c (check_stack_overflow, CHECK_STACK_OVERFLOW): now defined on Windows, too. * thread_win32.c (ruby_stack_overflowed_p): ditto. * thread_win32.c (rb_w32_stack_overflow_handler): use Structured Exception Handling by Addvectoredexceptionhandler() for machine stack overflow on mingw. This would be equivalent to the handling using __try and __exept on mswin introduced by r43748. Exception Handling by AddVectoredExceptionHandler() for machine This would be equivalent to the handling using __try and __except
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43748,45947,45951: [Backport #9739]
* eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of test/ruby/test_exception.rb on Windows. wrap by __try and __exception statements on mswin to raise SIGSEGV when EXCEPTION_STACK_OVERFLOW is occurred, because MSVCRT doesn't handle the exception. however, (1) mingw-gcc doesn't support __try and __exception statements, and (2) we cannot retry SystemStackError after this change yet (maybe crashed) because SEH and longjmp() are too uncongenial. * signal.c (check_stack_overflow, CHECK_STACK_OVERFLOW): now defined on Windows, too. * thread_win32.c (ruby_stack_overflowed_p): ditto. * thread_win32.c (rb_w32_stack_overflow_handler): use Structured Exception Handling by Addvectoredexceptionhandler() for machine stack overflow on mingw. This would be equivalent to the handling using __try and __exept on mswin introduced by r43748. Exception Handling by AddVectoredExceptionHandler() for machine This would be equivalent to the handling using __try and __except
History
#1
[ruby-core:62537]
Updated by luislavena (Luis Lavena) almost 4 years ago
- Category set to build
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
- Target version set to 2.2.0
Nobu,
Can you review, reject or approve so we can resolve these test failures?
Thank you.
#2
[ruby-core:62597]
Updated by h.shirosaki (Hiroshi Shirosaki) almost 4 years ago
#3
[ruby-core:62601]
Updated by h.shirosaki (Hiroshi Shirosaki) almost 4 years ago
- Category changed from build to platform/mingw
- Status changed from Assigned to Closed
Applied at r45947. Thank you.
#4
[ruby-core:63299]
Updated by nagachika (Tomoyuki Chikanaga) almost 4 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: UNKNOWN, 2.1: DONE
Backported into ruby_2_1
branch at r46522.
#5
[ruby-core:63357]
Updated by usa (Usaku NAKAMURA) almost 4 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: DONE to 2.0.0: DONE, 2.1: DONE
#6
[ruby-core:64738]
Updated by vo.x (Vit Ondruch) over 3 years ago
Interestingly, I met this test error recently on Fedora's builder:
3) Failure: TestException#test_machine_stackoverflow_by_define_method [/builddir/build/BUILD/ruby-2.2.0-r47288/test/ruby/test_exception.rb:555]: pid 19431 killed by SIGSEGV (signal 11) 15620 tests, 2470788 assertions, 1 failures, 0 errors, 31 skips ruby -v: ruby 2.2.0dev (2014-08-26 trunk 47288) [i386-linux]
merge revision(s) r45947,r45951: [Backport #9739] [Backport #9844]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@46522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e