ruby-changes:50111
From: kazu <ko1@a...>
Date: Mon, 5 Feb 2018 21:34:42 +0900 (JST)
Subject: [ruby-changes:50111] kazu:r62229 (trunk): Fix undefined behavior
kazu 2018-02-05 21:34:37 +0900 (Mon, 05 Feb 2018) New Revision: 62229 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62229 Log: Fix undefined behavior Modified files: trunk/tool/m4/ruby_check_va_copy.m4 Index: tool/m4/ruby_check_va_copy.m4 =================================================================== --- tool/m4/ruby_check_va_copy.m4 (revision 62228) +++ tool/m4/ruby_check_va_copy.m4 (revision 62229) @@ -14,9 +14,11 @@ conftest(int n, ...) https://github.com/ruby/ruby/blob/trunk/tool/m4/ruby_check_va_copy.m4#L14 va_start(ap, n); CONFTEST_VA_COPY(ap2, ap); for (i = 0; i < n; i++) if ((int)va_arg(ap, int) != n - i - 1) abort(); + va_end(ap); CONFTEST_VA_COPY(ap, ap2); for (i = 0; i < n; i++) if ((int)va_arg(ap, int) != n - i - 1) abort(); va_end(ap); + va_end(ap2); } int main() -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/