Comments (11)
If someone can link an executable that generate duplicates I will investigate about that
from binlex.
Lines 518 to 527 in 0f84757
Looks like no check if addr is visited here, maybe why we getting dupes
from binlex.
This check seems dont fix the issue, trying to put a 'guard' check after the element is get from the queue by the DecompilerWorker and check if is visited (this should not be visited) if we dont have an issue on address scheduling this bug is on TraitWorker
from binlex.
@jbx81-1337 you may want to try checking out the branch staging
as we keep all our bleeding edge changes there to see if there is any difference.
from binlex.
@herrcore did we address this, this issue ongoing?
from binlex.
Lines 229 to 257 in dd107c1
from binlex.
Seems AppendTrait is called multiple times for the same trait, i dont understand if is possible to trigger multiple conditional path in the section code provided by @c3rb3ru5d3d53c . I have tried to switch from 'if' to 'else if' but seems equal, my suggestion is to keep track of processed trait with AppendTrait in 'visited' map, set address as DECOMPILER_VISITED_APPENDED and remove the duplicated trait.
from binlex.
Investigating this one now 😄
from binlex.
Seems AppendTrait is called multiple times for the same trait, i dont understand if is possible to trigger multiple conditional path in the section code provided by @c3rb3ru5d3d53c . I have tried to switch from 'if' to 'else if' but seems equal, my suggestion is to keep track of processed trait with AppendTrait in 'visited' map, set address as DECOMPILER_VISITED_APPENDED and remove the duplicated trait.
So I thought about this a decent amount, there are times where a jump instruction can be referenced multiple times, and I also notice that functions are not duplicated. As such, I think that this issue does stem from what you are saying. Now the hard part is to determine where to best implement code to solve that. We could implement an additional check perhaps to the method CollectOperands
under each switch case perhaps by checking sections[index].addresses
and their associated types. I think this would be much more ideal than adding it to the method AppendTrait
as I think this would be inefficient.
from binlex.
So believe I found the issue, we need to split sections[index].addresses
into two sets, this would be easier to maintain, I could be incorrect, however it would appear we cannot store 2 different values for the same key in a map. This is needed because Functions will start with a block at the same address.
from binlex.
Ok, I don't really understand where the issue is because I noticed that the duplicated traits are type=block, and in any case the actual code doesn't push the addr on the Worker queue if Is already visited, I also made some checks for older version of binlex and seems has the same bug
from binlex.
Related Issues (20)
- Inconsistent Wildcarding HOT 1
- Appveyor Not Building Correctly HOT 2
- TLSH Version Bump
- CIL: Strange error when processing specific obfuscated .NET binary.
- TLSH Bytes and Traits HOT 5
- Compiler Warnings HOT 1
- Remove Decompiler.Setup Method (Redundant)
- LIEF 0.12.1 Version Bump
- Fix Windows Build Support
- CMakeLists.txt - Change ExternalProject_Add to findpackage HOT 4
- MacOS Build Support
- GLibC Issue with CI/CD for Linux HOT 4
- Add Check for BUILD_DIR in setup.py
- Segment violations when using the Python binding to the Raw disassembler HOT 9
- Update bldec Container with Updated Python API
- [Platform] submit sample in auto mode fail in bldec
- Segfault on certain ELF files HOT 3
- Missing LOOP instructions HOT 1
- Issue with Git Safe Directories
- Memory leak in ClearTrait() HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binlex.