ruby-changes:54567
From: k0kubun <ko1@a...>
Date: Fri, 11 Jan 2019 00:00:46 +0900 (JST)
Subject: [ruby-changes:54567] k0kubun:r66782 (trunk): revert r66768 for Ruby 2.7 due to Misc#15347
k0kubun 2019-01-11 00:00:40 +0900 (Fri, 11 Jan 2019) New Revision: 66782 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66782 Log: revert r66768 for Ruby 2.7 due to Misc#15347 It's safer to backport r66768 to 2.6 branch, but for 2.7 it's not needed anymore. Modified files: trunk/addr2line.c Index: addr2line.c =================================================================== --- addr2line.c (revision 66781) +++ addr2line.c (revision 66782) @@ -1193,7 +1193,6 @@ debug_info_reader_read_value(DebugInfoRe https://github.com/ruby/ruby/blob/trunk/addr2line.c#L1193 static char * di_find_abbrev(DebugInfoReader *reader, uint64_t abbrev_number) { - uint64_t n; char *p; if (abbrev_number < ABBREV_TABLE_SIZE) { return reader->abbrev_table[abbrev_number]; @@ -1208,7 +1207,7 @@ di_find_abbrev(DebugInfoReader *reader, https://github.com/ruby/ruby/blob/trunk/addr2line.c#L1207 uint64_t form = uleb128(&p); if (!at && !form) break; } - for (n = uleb128(&p); abbrev_number != n; n = uleb128(&p)) { + for (uint64_t n = uleb128(&p); abbrev_number != n; n = uleb128(&p)) { if (n == 0) { fprintf(stderr,"%d: Abbrev Number %"PRId64" not found\n",__LINE__, abbrev_number); exit(1); @@ -1507,9 +1506,7 @@ read_abstract_origin(DebugInfoReader *re https://github.com/ruby/ruby/blob/trunk/addr2line.c#L1506 static void debug_info_read(DebugInfoReader *reader, int num_traces, void **traces, - line_info_t *lines, int offset) -{ - int i; + line_info_t *lines, int offset) { while (reader->p < reader->cu_end) { DIE die; ranges_t ranges = {}; @@ -1558,7 +1555,7 @@ debug_info_read(DebugInfoReader *reader, https://github.com/ruby/ruby/blob/trunk/addr2line.c#L1555 } /* ranges_inspect(reader, &ranges); */ /* fprintf(stderr,"%d:%tx: %x ",__LINE__,diepos,die.tag); */ - for (i=offset; i < num_traces; i++) { + for (int i=offset; i < num_traces; i++) { uintptr_t addr = (uintptr_t)traces[i]; uintptr_t offset = addr - reader->obj->base_addr + reader->obj->vmaddr; uintptr_t saddr = ranges_include(reader, &ranges, offset); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/