Skip to content

Commit

Permalink
Merge pull request torvalds#183 from ojeda/overflow-checks
Browse files Browse the repository at this point in the history
Enable overflow checks by default and for release builds in the CI
  • Loading branch information
ojeda authored Apr 12, 2021
2 parents 9c1bc39 + f6fc80f commit 8374974
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kernel-arm64-release.config
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ CONFIG_CC_HAS_SANCOV_TRACE_PC=y
# Rust hacking
#
# CONFIG_RUST_DEBUG_ASSERTIONS is not set
# CONFIG_RUST_OVERFLOW_CHECKS is not set
CONFIG_RUST_OVERFLOW_CHECKS=y
CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_OPT_LEVEL_0 is not set
# CONFIG_RUST_OPT_LEVEL_1 is not set
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kernel-ppc64le-release.config
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ CONFIG_CC_HAS_SANCOV_TRACE_PC=y
# Rust hacking
#
# CONFIG_RUST_DEBUG_ASSERTIONS is not set
# CONFIG_RUST_OVERFLOW_CHECKS is not set
CONFIG_RUST_OVERFLOW_CHECKS=y
CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_OPT_LEVEL_0 is not set
# CONFIG_RUST_OPT_LEVEL_1 is not set
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kernel-x86_64-release.config
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ CONFIG_CC_HAS_SANCOV_TRACE_PC=y
# Rust hacking
#
# CONFIG_RUST_DEBUG_ASSERTIONS is not set
# CONFIG_RUST_OVERFLOW_CHECKS is not set
CONFIG_RUST_OVERFLOW_CHECKS=y
CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_OPT_LEVEL_0 is not set
# CONFIG_RUST_OPT_LEVEL_1 is not set
Expand Down
4 changes: 2 additions & 2 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -2557,7 +2557,7 @@ config RUST_DEBUG_ASSERTIONS

config RUST_OVERFLOW_CHECKS
bool "Overflow checks"
default n
default y
depends on RUST
help
Enables rustc's `-Coverflow-checks` codegen option.
Expand All @@ -2568,7 +2568,7 @@ config RUST_OVERFLOW_CHECKS

Note that this will apply to all Rust code, including `core`.

If unsure, say N.
If unsure, say Y.

choice
prompt "Optimization level"
Expand Down

0 comments on commit 8374974

Please sign in to comment.