summaryrefslogtreecommitdiff
path: root/tool
AgeCommit message (Collapse)Author
2024-06-11Extract hardening CFLAGS to a special $hardenflags variableKJ Tsanaktsidis
This changes the automatic detection of -fstack-protector, -D_FORTIFY_SOURCE, and -mbranch-protection to write to $hardenflags instead of $XCFLAGS. The definition of $cflags is changed to "$hardenflags $orig_cflags $optflags $debugflags $warnflags" to match. Furthermore, these flags are _prepended_ to $hardenflags, rather than appended. The implications of doing this are as follows: * If a CRuby builder specifies cflags="-mbranch-protection=foobar" at the ./configure script, and the configure script detects that -mbranch-protection=pac-ret is accepted, then GCC will be invoked as "gcc -mbranch-protection=pac-ret -mbranch-protection=foobar". Since the last flags take precedence, that means that user-supplied values of these flags in $cflags will take priority. * Likewise, if a CRuby builder explicitly specifies "hardenflags=-mbranch-protection=foobar", because we _prepend_ to $hardenflags in our autoconf script, we will still invoke GCC as "gcc -mbranch-protection=pac-ret -mbranch-protection=foobar". * If a CRuby builder specifies CFLAGS="..." at the configure line, automatic detection of hardening flags is ignored as before. * C extensions will _also_ be built with hardening flags now as well (this was not the case by default before because the detected flags went into $XCFLAGS). Additionally, as part of this work, I changed how the detection of PAC/BTI in Context.S works. Rather than appending the autodetected option to ASFLAGS, we simply compile a set of test programs with the actual CFLAGS in use to determine what PAC/BTI settings were actually chosen by the builder. Context.S is made aware of these choices through some custom macros. The result of this work is that: * Ruby will continue to choose some sensible defaults for hardening options for the C compiler * Distributors are able to specify CFLAGS that are consistent with their distribution and override these defaults * Context.S will react to whatever -mbranch-protection is actually in use, not what was autodetected * Extensions get built with hardening flags too. [Bug #20154] [Bug #20520]
2024-06-04Ignore retguard symbols when looking for leaked symbolsJeremy Evans
retguard symbols are added on OpenBSD as part of stack protection. They should be ignored by the leaked symbols checker, just as we ignore asan symbols.
2024-06-04merger.rb: Put spaces in between revisionsTakashi Kokubun
so that they are linked correctly on GitHub
2024-06-04Sync strscan HEAD again.Hiroshi SHIBATA
https://github.com/ruby/strscan/pull/99 split document with multi-byte chars.
2024-06-03Revert "Sync strscan document files to under the doc directory"Hiroshi SHIBATA
This reverts commit 5611e249e10bf95d48bbf27674bbb6b1fe588b5e. Followed up with https://github.com/ruby/ruby/commit/78bfde5d9f42f2d7bcfb40343477eb8e73ca0e29
2024-06-02Show destination directory after installationNobuyoshi Nakada
Due to the length of the list of gems to install, the message at the beginning of the installation scrolls out.
2024-05-30RUBY_CHECK_HEADER didn't define HAVE_{header-file} (#10876)Sorah Fukumori
--with-gmp is not working at all because HAVE_GMP_H was missing since 18eaf0be90. [Bug #20515] bug: https://bugs.ruby-lang.org/issues/20515 follow-up: https://bugs.ruby-lang.org/issues/20494 follow-up: 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b follow-up: https://github.com/ruby/ruby/pull/10805
2024-05-30Sync strscan document files to under the doc directoryHiroshi SHIBATA
2024-05-29release.sh: Explain example usagesTakashi Kokubun
2024-05-29release.sh: We don't release tar.bz2 anymoreTakashi Kokubun
2024-05-30Suppress warnings about frozen string literal featureHiroshi SHIBATA
``` tool/redmine-backporter.rb:69: warning: literal string will be frozen in the future ```
2024-05-29Sort backport revisions by commit timestampsTakashi Kokubun
2024-05-28merger.rb: Don't ask "conflicts resolved?" if not neededTakashi Kokubun
2024-05-28redmine-backporter.rb: Prepend commit: to every revisionTakashi Kokubun
2024-05-28redmine-backporter.rb: Remove an unneeded spaceTakashi Kokubun
from #backport_command_string I don't want to leave unneeded spaces in the command history by copy-pasting the entire line.
2024-05-28merger.rb: Auto-detect tickets when --ticket is not givenTakashi Kokubun
2024-05-28merger.rb: Drop an obsoleted command from helpTakashi Kokubun
It was needed only for SVN, and we dropped SVN support.
2024-05-28merger.rb: Use commit: prefix in more placesTakashi Kokubun
2024-05-28merger.rb: Improve the help messageTakashi Kokubun
It wasn't clear whether the backport command takes a commit hash or a ticket number.
2024-05-28merger.rb: Drop SVN supportTakashi Kokubun
2024-05-28redmine-backporter.rb: Use commit: prefixTakashi Kokubun
2024-05-28redmine-backporter.rb: Highlight closed ticketsTakashi Kokubun
2024-05-28redmine-backporter.rb: Fix #color for Ruby 3 splatTakashi Kokubun
color(*PRIORITIES['Immediate']) didn't work with Ruby 3.
2024-05-28redmine-backporter.rb: Drop SVN supportTakashi Kokubun
2024-05-28redmine-backporter.rb: Migrate Readline to RelineTakashi Kokubun
instead of using a local Readline port as a fallback
2024-05-28redmine-backporter.rb: Get rid of VERSIONTakashi Kokubun
that has never been utilized
2024-05-28redmine-backporter.rb: Print help on wrong usageTakashi Kokubun
2024-05-23Introduce a specialize instruction for Array#packNobuyoshi Nakada
Instructions for this code: ```ruby # frozen_string_literal: true [a].pack("C") ``` Before this commit: ``` == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)> 0000 putself ( 3)[Li] 0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 newarray 1 0005 putobject "C" 0007 opt_send_without_block <calldata!mid:pack, argc:1, ARGS_SIMPLE> 0009 leave ``` After this commit: ``` == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)> 0000 putself ( 3)[Li] 0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 putobject "C" 0005 opt_newarray_send 2, :pack 0008 leave ``` Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2024-05-20Re-use strscan with ruby repoHiroshi SHIBATA
2024-05-20[Bug #20494] Search non-default directories for GMPNobuyoshi Nakada
Co-Authored-by: lish82 (Hiroki Katagiri)
2024-05-09Revert "Update revision.h if branch unmatch not only revision"Nobuyoshi Nakada
This reverts commit 5a332940ed2f809cb17af7e4d068089b6e1fa6ca. Something does not work well on Github Actions.
2024-05-08Update revision.h if branch unmatch not only revision [ci skip]Nobuyoshi Nakada
2024-05-08Show the caller location of assertion methodsNobuyoshi Nakada
Not only defined in `Test::Unit` or `CoreAssertions`, also show the caller location of assertion methods defined in the current class or ancestors.
2024-05-07[PRISM] Enable test_methoddef_endless_commandKevin Newton
2024-05-02Lrama v0.6.9yui-knk
2024-04-29Lrama v0.6.8yui-knk
2024-04-28Lrama v0.6.7yui-knk
2024-04-27Lrama v0.6.6yui-knk
2024-04-26Set executable on rdoc-srcdir [ci skip]Nobuyoshi Nakada
2024-04-25[Bug #20450] Remove rubyarchdir from bootsnap pathsEugene Kenny
2024-04-23Remove newlines of MIME encoded subject lineNARUSE, Yui
2024-04-23exit 1 if failedNARUSE, Yui
2024-04-23Traverse tmpdir under chdirNobuyoshi Nakada
2024-04-23Shorten tmpdir pathNobuyoshi Nakada
2024-04-22[DOC] Tweek a commentNobuyoshi Nakada
2024-04-22Extract `list_tree` as a method and separate from removalsNobuyoshi Nakada
2024-04-22Show left tmpdir recursivelyNobuyoshi Nakada
2024-04-22Windows does not have "/tmp" path usuallyNobuyoshi Nakada
2024-04-20Fix method nameNobuyoshi Nakada
2024-04-19Show left files infoNobuyoshi Nakada