Граф коммитов

3421 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun 0a6b1a4d9d redmine-backporter.rb: Prepend commit: to shorter revs
Some of the places in Redmine (e.g. Associated revisions) print
revisions using only 8 characters. Even when I copied a revision from
there, I want to prepend commit: in the message.
2024-06-11 11:28:04 -07:00
KJ Tsanaktsidis 0ccb80d6bf Extract hardening CFLAGS to a special $hardenflags variable
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-11 20:48:55 +10:00
Jeremy Evans ac429df64f Ignore retguard symbols when looking for leaked symbols
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-04 13:04:41 -07:00
Takashi Kokubun 40a9e806f2 merger.rb: Put spaces in between revisions
so that they are linked correctly on GitHub
2024-06-04 11:31:20 -07:00
Hiroshi SHIBATA 3eda59e975
Sync strscan HEAD again.
https://github.com/ruby/strscan/pull/99 split document with multi-byte
chars.
2024-06-04 12:40:08 +09:00
Hiroshi SHIBATA d50404d6fe
Revert "Sync strscan document files to under the doc directory"
This reverts commit 5611e249e1.

Followed up with 78bfde5d9f
2024-06-03 14:20:23 +09:00
Nobuyoshi Nakada 733c72e6f0
Show destination directory after installation
Due to the length of the list of gems to install, the message at the
beginning of the installation scrolls out.
2024-06-02 17:21:22 +09:00
Sorah Fukumori 1ab7c412d2
RUBY_CHECK_HEADER didn't define HAVE_{header-file} (#10876)
--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: 18eaf0be90
follow-up: https://github.com/ruby/ruby/pull/10805
2024-05-30 18:52:26 +00:00
Hiroshi SHIBATA 5611e249e1
Sync strscan document files to under the doc directory 2024-05-30 12:34:18 +09:00
Takashi Kokubun 53150b18de release.sh: Explain example usages 2024-05-29 20:25:41 -07:00
Takashi Kokubun 8a9d8a0ef6 release.sh: We don't release tar.bz2 anymore 2024-05-29 20:22:25 -07:00
Hiroshi SHIBATA f1702261d7
Suppress warnings about frozen string literal feature
```
tool/redmine-backporter.rb:69: warning: literal string will be frozen in the future
```
2024-05-30 10:32:33 +09:00
Takashi Kokubun a760e21bc1 Sort backport revisions by commit timestamps 2024-05-29 10:39:32 -07:00
Takashi Kokubun d9d7ae7830 merger.rb: Don't ask "conflicts resolved?" if not needed 2024-05-28 17:46:58 -07:00
Takashi Kokubun 7e95efdafa redmine-backporter.rb: Prepend commit: to every revision 2024-05-28 17:17:16 -07:00
Takashi Kokubun d0cde43a33 redmine-backporter.rb: Remove an unneeded space
from #backport_command_string

I don't want to leave unneeded spaces in the command history by
copy-pasting the entire line.
2024-05-28 17:00:47 -07:00
Takashi Kokubun 2eded6cc5d merger.rb: Auto-detect tickets when --ticket is not given 2024-05-28 16:30:22 -07:00
Takashi Kokubun 24c56ed516 merger.rb: Drop an obsoleted command from help
It was needed only for SVN, and we dropped SVN support.
2024-05-28 15:43:24 -07:00
Takashi Kokubun b0ebad51e5 merger.rb: Use commit: prefix in more places 2024-05-28 14:28:50 -07:00
Takashi Kokubun d1265d6172 merger.rb: Improve the help message
It wasn't clear whether the backport command takes a commit hash or a
ticket number.
2024-05-28 14:05:51 -07:00
Takashi Kokubun 7a860bacee merger.rb: Drop SVN support 2024-05-28 13:51:45 -07:00
Takashi Kokubun 7873275326 redmine-backporter.rb: Use commit: prefix 2024-05-28 13:37:53 -07:00
Takashi Kokubun 13307cd944 redmine-backporter.rb: Highlight closed tickets 2024-05-28 11:46:15 -07:00
Takashi Kokubun 2608f2a23b redmine-backporter.rb: Fix #color for Ruby 3 splat
color(*PRIORITIES['Immediate']) didn't work with Ruby 3.
2024-05-28 11:41:31 -07:00
Takashi Kokubun 3f256dc66a redmine-backporter.rb: Drop SVN support 2024-05-28 10:47:51 -07:00
Takashi Kokubun 450e9d2495 redmine-backporter.rb: Migrate Readline to Reline
instead of using a local Readline port as a fallback
2024-05-28 10:42:47 -07:00
Takashi Kokubun db7c385897 redmine-backporter.rb: Get rid of VERSION
that has never been utilized
2024-05-28 10:39:39 -07:00
Takashi Kokubun e5759e4126 redmine-backporter.rb: Print help on wrong usage 2024-05-28 10:34:16 -07:00
Nobuyoshi Nakada 49fcd33e13 Introduce a specialize instruction for Array#pack
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-23 12:11:50 -07:00
Hiroshi SHIBATA 7f0e26b7f9 Re-use strscan with ruby repo 2024-05-20 18:10:09 +09:00
Nobuyoshi Nakada 18eaf0be90 [Bug #20494] Search non-default directories for GMP
Co-Authored-by: lish82 (Hiroki Katagiri)
2024-05-20 13:54:08 +09:00
Nobuyoshi Nakada e937878883
Revert "Update revision.h if branch unmatch not only revision"
This reverts commit 5a332940ed.
Something does not work well on Github Actions.
2024-05-09 01:02:59 +09:00
Nobuyoshi Nakada 5a332940ed
Update revision.h if branch unmatch not only revision [ci skip] 2024-05-08 21:39:32 +09:00
Nobuyoshi Nakada aabe718e64
Show the caller location of assertion methods
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-08 17:24:36 +09:00
Kevin Newton b4b39a6199 [PRISM] Enable test_methoddef_endless_command 2024-05-07 14:24:31 -04:00
yui-knk fcd89bf668 Lrama v0.6.9 2024-05-02 13:32:04 +09:00
yui-knk 5ed2064419 Lrama v0.6.8 2024-04-29 15:09:26 +09:00
yui-knk 5c3d5c7cdd Lrama v0.6.7 2024-04-28 13:38:36 +09:00
yui-knk bf1f16ef47 Lrama v0.6.6 2024-04-27 10:06:09 +09:00
Nobuyoshi Nakada 500586b401
Set executable on rdoc-srcdir [ci skip] 2024-04-26 19:22:16 +09:00
Eugene Kenny 67dd9af17e [Bug #20450] Remove rubyarchdir from bootsnap paths 2024-04-25 13:29:28 +09:00
NARUSE, Yui 3fadd68452 Remove newlines of MIME encoded subject line 2024-04-23 20:14:41 +09:00
NARUSE, Yui 0b4bf05985 exit 1 if failed 2024-04-23 20:14:18 +09:00
Nobuyoshi Nakada a53435868e
Traverse tmpdir under chdir 2024-04-23 13:38:40 +09:00
Nobuyoshi Nakada 777daae049
Shorten tmpdir path 2024-04-23 13:38:39 +09:00
Nobuyoshi Nakada d42a8d6602
[DOC] Tweek a comment 2024-04-22 13:00:19 +09:00
Nobuyoshi Nakada 44d2b59491
Extract `list_tree` as a method and separate from removals 2024-04-22 13:00:19 +09:00
Nobuyoshi Nakada c65bc2e5d9
Show left tmpdir recursively 2024-04-22 13:00:19 +09:00
Nobuyoshi Nakada e59da9c339
Windows does not have "/tmp" path usually 2024-04-22 09:56:47 +09:00
Nobuyoshi Nakada 9f9755664d
Fix method name 2024-04-20 11:34:52 +09:00