Show RZ_LOG_WARN warnings by default for all build opt levels (#5084)
* Show RZ_LOG_WARN warnings by default for all build opt levels * Check for unsupported `checks_level` values
This commit is contained in:
parent
fe36e213e2
commit
602b1ae187
9 changed files with 7 additions and 19 deletions
11
meson.build
11
meson.build
|
|
@ -330,15 +330,10 @@ message('HAVE_PTRACE: @0@'.format(have_ptrace))
|
|||
message('USE_PTRACE_WRAP: @0@'.format(use_ptrace_wrap))
|
||||
|
||||
checks_level = get_option('checks_level')
|
||||
if checks_level == 9999
|
||||
if get_option('buildtype') == 'release'
|
||||
checks_level = 1
|
||||
else
|
||||
checks_level = 2
|
||||
endif
|
||||
endif
|
||||
|
||||
message('RZ_CHECKS_LEVEL: @0@'.format(checks_level))
|
||||
if checks_level < 0 or checks_level > 3
|
||||
error('`checks_level` must be between 0 and 3.')
|
||||
endif
|
||||
|
||||
userconf = configuration_data()
|
||||
ccs = [[cc, userconf, host_machine, false]]
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ option('rizin_hud', type: 'string', value: '', description: 'Install path for hu
|
|||
option('rizin_plugins', type: 'string', value: '', description: 'Path where plugins are expected to be found')
|
||||
option('rizin_bindings', type: 'string', value: '', description: 'Path where rizin bindings are expected to be found')
|
||||
|
||||
option('checks_level', type: 'integer', value: 9999, description: 'Value between 0 and 3 to enable different level of assert (see RZ_CHECKS_LEVEL). By default its value depends on buildtype (2 on debug, 1 on release).')
|
||||
option('checks_level', type: 'integer', value: 2, description: 'Value between 0 and 3 to enable different level of assert (see RZ_CHECKS_LEVEL)')
|
||||
option('use_sys_capstone', type: 'feature', value: 'disabled')
|
||||
option('use_capstone_version', type: 'combo', choices: ['v4', 'v5', 'v6', 'next'], value: 'next', description: 'Specify which version of capstone to use')
|
||||
option('use_sys_magic', type: 'feature', value: 'disabled')
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ RUN
|
|||
|
||||
NAME=ood check for ptrace errors
|
||||
FILE=bins/elf/analysis/x86-helloworld-gcc
|
||||
ARGS=-e log.level=3
|
||||
CMDS=<<EOF
|
||||
ood
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -301,7 +301,6 @@ RUN
|
|||
|
||||
NAME=f.lj
|
||||
FILE=bins/elf/analysis/main
|
||||
ARGS=-e log.level=3
|
||||
CMDS=<<EOF
|
||||
af
|
||||
f. patata
|
||||
|
|
@ -328,7 +327,6 @@ RUN
|
|||
|
||||
NAME=f.-
|
||||
FILE=bins/elf/analysis/main
|
||||
ARGS=-e log.level=3
|
||||
CMDS=<<EOF
|
||||
af
|
||||
f. patata
|
||||
|
|
|
|||
|
|
@ -1379,7 +1379,6 @@ NAME=String search - warn if |search literal| < search.str.min_length
|
|||
FILE==
|
||||
ARGS=-1
|
||||
CMDS=<<EOF
|
||||
e log.level=3
|
||||
w ab @ 0x10
|
||||
w abc @ 0x20
|
||||
w abcd @ 0x30
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
NAME=ELF: endbr-main-mov
|
||||
FILE=bins/elf/endbr-main
|
||||
CMDS=%v main
|
||||
ARGS=-e log.level=3
|
||||
EXPECT=<<EOF
|
||||
0x401126
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ RUN
|
|||
|
||||
NAME=disable sections load
|
||||
FILE=bins/elf/analysis/hello-linux-x86_64
|
||||
ARGS=-e log.level=3 -e elf.load.sections=false
|
||||
ARGS=-e elf.load.sections=false
|
||||
CMDS=iS
|
||||
EXPECT=<<EOF
|
||||
paddr size vaddr vsize align perm name type flags
|
||||
|
|
@ -113,7 +113,7 @@ RUN
|
|||
|
||||
NAME=disable sections checks
|
||||
FILE=bins/elf/libmemalloc-dump-mem
|
||||
ARGS=-e log.level=3 -e elf.checks.sections=false
|
||||
ARGS=-e elf.checks.sections=false
|
||||
CMDS=iS
|
||||
EXPECT=<<EOF
|
||||
paddr size vaddr vsize align perm name type flags
|
||||
|
|
@ -150,7 +150,7 @@ RUN
|
|||
|
||||
NAME=disable segments checks
|
||||
FILE=bins/elf/analysis/tiny.elf
|
||||
ARGS=-e log.level=3 -e elf.checks.segments=false
|
||||
ARGS=-e elf.checks.segments=false
|
||||
CMDS=iS
|
||||
EXPECT=<<EOF
|
||||
paddr size vaddr vsize align perm name type flags
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ RUN
|
|||
NAME=rz-bin -k file
|
||||
FILE=bins/elf/analysis/hello-linux-x86_64
|
||||
CMDS=!rz-bin -k ${RZ_FILE}
|
||||
ARGS=-e log.level=3
|
||||
EXPECT=
|
||||
EXPECT_ERR=<<EOF
|
||||
WARNING: Neither hash nor gnu_hash exist. Falling back to heuristics for deducing the number of dynamic symbols...
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ RUN
|
|||
NAME=bin with space in filename
|
||||
FILE=bins/elf/_Exit (42)
|
||||
CMDS=i~^file
|
||||
ARGS=-e log.level=3
|
||||
EXPECT=<<EOF
|
||||
file bins/elf/_Exit (42)
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Reference in a new issue