diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-08 06:53:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-08 06:53:33 +0000 |
commit | 9878d2199c8d5c20253d765d7837f17973b14498 (patch) | |
tree | ff449893f9e287311cfc90d9634c0866ee43a409 /error.c | |
parent | 8de18f9cda17997c4831c15e74574c44a6100ff5 (diff) |
* error.c (rb_bug): get rid of segfault after all threads
disposed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -265,9 +265,16 @@ void rb_bug(const char *fmt, ...) { va_list args; + const char *file = NULL; + int line = 0; + + if (GET_THREAD()) { + file = rb_sourcefile(); + line = rb_sourceline(); + } va_start(args, fmt); - report_bug(rb_sourcefile(), rb_sourceline(), fmt, args); + report_bug(file, line, fmt, args); va_end(args); #if defined(_WIN32) && defined(RT_VER) && RT_VER >= 80 |