Use of partially written variable during optimized divide fails to simplify

Open
#4,367 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start by reproducing the optimized divide behavior with the provided partial_write.zip binaries, including the listed u8, u16, i8, and i16 examples. Trace how partial variable writes are handled during optimized divide simplification; done means the affected examples simplify into division expressions.

Written by the indexing model from the issue text.

Description

Component: Core Core: HLIL Effort: Low IL Optimization Impact: Low

If intermediate stages of an optimized divide use partial variable writes, the expression fails
to simplify into a division expression.

partial_write

Binaries with examples:

partial_write.zip

u8_div_4k_x64.so: See 3, 5, 6, 7, 9, and others
u16_div_4k_x64.so: See 7, 21, 23, 25, and others
i16_div_4k_x64.so: See 3, 5, 6, 7, 9, and others
i8_div_4k_x86.so: See 3, 5, 6, 7, 9, and others
i16_div_4k_x86.so: See 3, 5, 6, 7, 9, and others
u8_div_4k_x86.so: See 3, 5, 6, 7, 9, and others
u16_div_4k_x86.so: See 7, 21, 23, 25, and others

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.