<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/addr2line.c, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[Backport 3.4] Fix C level backtraces for USE_ELF</title>
<updated>2025-05-02T16:02:57+00:00</updated>
<author>
<name>Daniel Colson</name>
<email>danieljamescolson@gmail.com</email>
</author>
<published>2025-04-28T16:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac311437d3c4d60fe4ac100e9652b0cbc3e5f481'/>
<id>ac311437d3c4d60fe4ac100e9652b0cbc3e5f481</id>
<content type='text'>
[Backport #21289]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Backport #21289]
</pre>
</div>
</content>
</entry>
<entry>
<title>Expand tabs in addr2line.c</title>
<updated>2024-11-28T16:34:38+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-11-27T18:16:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2da92388b948821269b18d6b178a680f17e41750'/>
<id>2da92388b948821269b18d6b178a680f17e41750</id>
<content type='text'>
.git-blame-ignore-revs will be updated after this commit is merged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
.git-blame-ignore-revs will be updated after this commit is merged.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix global-buffer-overflow when outputting C backtrace</title>
<updated>2024-11-27T19:36:50+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-11-27T18:57:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7dd2afbe3a14d021e5554288517709f5778c3d58'/>
<id>7dd2afbe3a14d021e5554288517709f5778c3d58</id>
<content type='text'>
fill_lines is passed -1 for offset, which causes it to read the -1 index
of traces. This is not valid memory as -1 is reading before the trace
global variable in rb_print_backtrace. This code comes from commit
99d1f5f88b9b6de3124e31019902f91e030d334f, where there used to be special
handling for the -1 index.

We can see this error in ASAN:

    ==71037==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00010157abf8 at pc 0x00010116f3b8 bp 0x00016f92c3b0 sp 0x00016f92c3a8
    READ of size 8 at 0x00010157abf8 thread T0
        #0 0x10116f3b4 in debug_info_read addr2line.c:1945
        #1 0x10116cc90 in fill_lines addr2line.c:2497
        #2 0x101169dbc in rb_dump_backtrace_with_lines addr2line.c:2635
        #3 0x100e56788 in rb_print_backtrace vm_dump.c:825
        #4 0x100e56db4 in rb_vm_bugreport vm_dump.c:1155
        #5 0x100734dc4 in rb_bug_without_die error.c:1085
        #6 0x100734ae4 in rb_bug error.c:109
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fill_lines is passed -1 for offset, which causes it to read the -1 index
of traces. This is not valid memory as -1 is reading before the trace
global variable in rb_print_backtrace. This code comes from commit
99d1f5f88b9b6de3124e31019902f91e030d334f, where there used to be special
handling for the -1 index.

We can see this error in ASAN:

    ==71037==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00010157abf8 at pc 0x00010116f3b8 bp 0x00016f92c3b0 sp 0x00016f92c3a8
    READ of size 8 at 0x00010157abf8 thread T0
        #0 0x10116f3b4 in debug_info_read addr2line.c:1945
        #1 0x10116cc90 in fill_lines addr2line.c:2497
        #2 0x101169dbc in rb_dump_backtrace_with_lines addr2line.c:2635
        #3 0x100e56788 in rb_print_backtrace vm_dump.c:825
        #4 0x100e56db4 in rb_vm_bugreport vm_dump.c:1155
        #5 0x100734dc4 in rb_bug_without_die error.c:1085
        #6 0x100734ae4 in rb_bug error.c:109
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix C level backtrace info on macOS clang 16</title>
<updated>2024-11-27T17:12:23+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-11-27T15:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0af2eafc590d863568e8203312f415142608d48c'/>
<id>0af2eafc590d863568e8203312f415142608d48c</id>
<content type='text'>
macOS clang 16 generates DWARF5, which have Mach-O section names that
are limited to 16 characters, which causes sections with long names to
be truncated and not match above.

See: https://wiki.dwarfstd.org/Best_Practices.md#Mach-2d-O
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
macOS clang 16 generates DWARF5, which have Mach-O section names that
are limited to 16 characters, which causes sections with long names to
be truncated and not match above.

See: https://wiki.dwarfstd.org/Best_Practices.md#Mach-2d-O
</pre>
</div>
</content>
</entry>
<entry>
<title>Move an embedded directive outside macro arguments</title>
<updated>2024-02-08T03:06:07+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-02-08T02:15:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ce6054a667029af3edc32cfd2e0e7c281cfdf332'/>
<id>ce6054a667029af3edc32cfd2e0e7c281cfdf332</id>
<content type='text'>
Suppress warnings/errors by -Wembedded-directive with `-std=c99` on
macOS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suppress warnings/errors by -Wembedded-directive with `-std=c99` on
macOS.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix build on FreeBSD</title>
<updated>2023-09-25T17:07:32+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-09-25T17:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cbb38331dd3d0df2de0b7857ee655ab5c3a5229a'/>
<id>cbb38331dd3d0df2de0b7857ee655ab5c3a5229a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Dump backtraces to an arbitrary stream</title>
<updated>2023-09-25T13:57:28+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-07-31T18:04:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac244938e8b97c8bd42d1dc8ed820091e6ef5537'/>
<id>ac244938e8b97c8bd42d1dc8ed820091e6ef5537</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Continue even if addr or rnglists headers not found</title>
<updated>2023-09-08T03:22:55+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-09-08T03:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b6df6f911c6745a1e57a1d5dd7bc1c22a57722a8'/>
<id>b6df6f911c6745a1e57a1d5dd7bc1c22a57722a8</id>
<content type='text'>
Fix up commit 31d1226, "Avoid aborting inside addr2line.c".
Source code informations did not appear in C level backtrace since
that change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix up commit 31d1226, "Avoid aborting inside addr2line.c".
Source code informations did not appear in C level backtrace since
that change.
</pre>
</div>
</content>
</entry>
<entry>
<title>empty initializer is a C++ ism</title>
<updated>2023-08-25T08:27:53+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2023-08-25T05:07:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fa54406f50c1c79a835e68cbc015ff7fc86ed92b'/>
<id>fa54406f50c1c79a835e68cbc015ff7fc86ed92b</id>
<content type='text'>
C99 does not allow this syntax.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
C99 does not allow this syntax.
</pre>
</div>
</content>
</entry>
<entry>
<title>Check if reader members are set</title>
<updated>2023-08-03T00:51:52+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-08-02T16:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fe977314d5a9fdf721584c0396e1040960d78000'/>
<id>fe977314d5a9fdf721584c0396e1040960d78000</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
