Bug #1161
closedBuild Assertion Failure with VC+++ - Unitialized variable in rb_define_hooked_variable
Description
=begin
Build ruby 1.9.1 with VC 2008 using the following flags:
RUNTIMEFLAG = -MDd
OPTFLAGS = -Od -RTC1
LDFLAGS = -link -INCREMENTAL:NO -DEBUG -OPT:REF -OPT:ICF
Failure occurs when running miniruby.exe for the first time:
Run-Time Check Failure #3 - The variable 'tmp' is being used without being initialized.
This patch fixes the problem:
--- variable.c 2009-02-14 14:18:26 -0700
+++ variable.old.c 2009-02-14 14:16:05 -0700
@@ -484,8 +484,7 @@
gvar->setter = setter?(gvar_setter_t *)setter:var_setter;
gvar->marker = var_marker;
- if (var)
-
RB_GC_GUARD(tmp);
- RB_GC_GUARD(tmp);
}
void
=end
Updated by cfis (Charlie Savage) about 16 years ago
=begin
Sorry, reversed the patch. It should be:
--- variable.old.c 2009-02-14 14:16:05 -0700
+++ variable.c 2009-02-14 14:20:44 -0700
@@ -484,7 +484,8 @@
gvar->setter = setter?(gvar_setter_t *)setter:var_setter;
gvar->marker = var_marker;
- RB_GC_GUARD(tmp);
- if (var)
-
RB_GC_GUARD(tmp);
}
void
=end
Updated by nobu (Nobuyoshi Nakada) about 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r22322.
=end