[前][次][番号順一覧][スレッド一覧]

ruby-changes:57716

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Wed, 11 Sep 2019 16:01:41 +0900 (JST)
Subject: [ruby-changes:57716] 655c65d65b (master): &$$->nd_lit is uninitialized at this point

https://git.ruby-lang.org/ruby.git/commit/?id=655c65d65b

From 655c65d65b75a6ac733dfb8e42437e7c43b7cfe1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Tue, 10 Sep 2019 16:41:34 +0900
Subject: &$$->nd_lit is uninitialized at this point

See also https://travis-ci.org/ruby/ruby/jobs/583031687#L1874

diff --git a/parse.y b/parse.y
index 1ba07b4..f384679 100644
--- a/parse.y
+++ b/parse.y
@@ -4608,7 +4608,7 @@ numeric 	: simple_numeric https://github.com/ruby/ruby/blob/trunk/parse.y#L4608
 		    {
 		    /*%%%*/
 			$$ = $2;
-			RB_OBJ_WRITTEN(p->ast, &$$->nd_lit, $$->nd_lit = negate_lit(p, $$->nd_lit));
+			RB_OBJ_WRITE(p->ast, &$$->nd_lit, negate_lit(p, $$->nd_lit));
 		    /*% %*/
 		    /*% ripper: unary!(ID2VAL(idUMinus), $2) %*/
 		    }
@@ -5185,7 +5185,7 @@ assoc		: arg_value tASSOC arg_value https://github.com/ruby/ruby/blob/trunk/parse.y#L5185
 		    /*%%%*/
 			if (nd_type($1) == NODE_STR) {
 			    nd_set_type($1, NODE_LIT);
-			    RB_OBJ_WRITTEN(p->ast, &$1->nd_lit, $1->nd_lit = rb_fstring($1->nd_lit));
+			    RB_OBJ_WRITE(p->ast, &$1->nd_lit, rb_fstring($1->nd_lit));
 			}
 			$$ = list_append(p, NEW_LIST($1, &@$), $3);
 		    /*% %*/
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]