Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-picks for 0.6.2 release #3796

Merged
merged 24 commits into from
Sep 11, 2023
Merged

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Aug 27, 2023

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

Bugfixes and documentation updates

Test plan

CI is green

PeiweiHu and others added 9 commits August 27, 2023 11:32
* Fix memleak in rz_il_handler_empty()

* Fix memleak in compare_op()

* Fix memleak in assign_reg()

* Fix memleak in rz_asm_op_fini()

* Fix memleak in rz_core_analysis_bytes()

* Fix memleak in add_sub_op()

* Fix memleak in bitwise_op()

* Fix memleak in shift_and_rotate()
)

* subprojects/zlib: Improve meson.build, emulating configure script
* Update zlib to 1.3
This is a cherry pick of [1]. The removed mappings overwrite previous
entries and cannot be found in [2].

[1] radareorg/radare2@c67c47e
[2] https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/unistd.h

Signed-off-by: Marcin Sobczyk <[email protected]>
'rizin' is missing a lot of syscalls for i.e. arm. We can check that
with:

 rizin -a x86_64 -b 64 -k linux -q -c asl

vs

 rizin -a arm -b 64 -k linux -q -c asl

'rz_syscall_item_new_from_string' splits the incoming string by commas
and expects at least 3 items as a result. This patch fixes
syscall preprocessing by appending empty strings to match the expected
number of items after a split.

This is a clone of a fix posted to radare2 [1].

[1] radareorg/radare2#21508
* Add test for pointer read command `*`

Test for `asm.bits=8` uses `asm.arch=6502` because `asm.bits=8` is
unsupported for the default arch.

* Fix pointer command `*` broken since move from `?` to `%` ##shell

* Refactor to use appropriate existing API in `num_callback`
@XVilka
Copy link
Member Author

XVilka commented Aug 27, 2023

Looks like only missing things are remaining ?v invocations @ret2libc

@pelijah

This comment was marked as resolved.

@XVilka

This comment was marked as resolved.

@XVilka

This comment was marked as resolved.

@pelijah

This comment was marked as resolved.

@github-actions github-actions bot added the RzBin label Aug 28, 2023
ttxine and others added 3 commits August 29, 2023 12:25
…shell (#3794)

* Update the golang analysis tests to seek to the main function before
  dumping strings, which was previously done as a side effect of using
  `@@f` during auto-analysis.
* Test whether there is error on `rizin -d`

* Make env more like local env

* Add space btw `env` and its arg

* rz-run resolve_value: Pass single-quoted strings unaltered
@XVilka XVilka force-pushed the dist-asan-fuzz-0.6.2-cherrypicks branch from b9fcc68 to a2f59f0 Compare August 29, 2023 04:26
@XVilka XVilka requested a review from yossizap as a code owner August 29, 2023 04:26
ttxine and others added 6 commits September 4, 2023 10:21
* Fix memleak in rz_seek_history_list_handler()
* Fix memleaks in rz_eval_getset_handler()
* Fix memleaks in visual_comma()
* Fix memleak in cmd_pxr()
* Fix memleak in arged_stmt
@XVilka
Copy link
Member Author

XVilka commented Sep 4, 2023

Something is really wrong with NetBSD (happens also on dev):

+ python3.8 -m ensurepip --user Traceback (most recent call last):   File "<string>", line 6, in <module>   File "/usr/pkg/lib/python3.8/runpy.py", line 207, in run_module     return _run_module_code(code, init_globals, run_name, mod_spec)   File "/usr/pkg/lib/python3.8/runpy.py", line 97, in _run_module_code     _run_code(code, mod_globals, init_globals,   File "/usr/pkg/lib/python3.8/runpy.py", line 87, in _run_code     exec(code, run_globals)   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/__main__.py", line 31, in <module>   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/cli/main.py", line 68, in main   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/commands/__init__.py", line 114, in create_command   File "/usr/pkg/lib/python3.8/importlib/__init__.py", line 127, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import   File "<frozen importlib._bootstrap>", line 991, in _find_and_load   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked   File "<frozen importlib._bootstrap>", line 655, in _load_unlocked   File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/commands/install.py", line 16, in <module>   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/cli/req_command.py", line 21, in <module>   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/index/package_finder.py", line 30, in <module>   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/req/__init__.py", line 8, in <module>   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/req/req_install.py", line 44, in <module>   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_internal/operations/install/wheel.py", line 39, in <module>   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_vendor/distlib/scripts.py", line 16, in <module>   File "<frozen zipimport>", line 259, in load_module   File "/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl/pip/_vendor/distlib/compat.py", line 83, in <module>   File "/usr/pkg/lib/python3.8/xmlrpc/client.py", line 138, in <module>     from xml.parsers import expat   File "/usr/pkg/lib/python3.8/xml/parsers/expat.py", line 4, in <module>     from pyexpat import * ModuleNotFoundError: No module named 'pyexpat' Traceback (most recent call last):   File "/usr/pkg/lib/python3.8/runpy.py", line 194, in _run_module_as_main     return _run_code(code, main_globals, None,   File "/usr/pkg/lib/python3.8/runpy.py", line 87, in _run_code     exec(code, run_globals)   File "/usr/pkg/lib/python3.8/ensurepip/__main__.py", line 5, in <module>     sys.exit(ensurepip._main())   File "/usr/pkg/lib/python3.8/ensurepip/__init__.py", line 209, in _main     return _bootstrap(   File "/usr/pkg/lib/python3.8/ensurepip/__init__.py", line 128, in _bootstrap     return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)   File "/usr/pkg/lib/python3.8/ensurepip/__init__.py", line 37, in _run_pip     return subprocess.run(cmd, check=True).returncode   File "/usr/pkg/lib/python3.8/subprocess.py", line 516, in run     raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/pkg/bin/python3.8', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmpcfwb944t/setuptools-56.0.0-py3-none-any.whl\', \'/tmp/tmpcfwb944t/pip-23.0.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmpcfwb944t\', \'--user\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.

The crux of the problem seems to be missing pyexpat module for some reason: ModuleNotFoundError: No module named 'pyexpat'

@XVilka XVilka merged commit d873a78 into stable Sep 11, 2023
51 checks passed
@XVilka XVilka deleted the dist-asan-fuzz-0.6.2-cherrypicks branch September 11, 2023 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.