Comments (4)
Fixed the syntax error in test provided and added to tool tests. Passes.
from llvm-mctoll.
Thanks for using the tool and for the bug report.
Can you add the gcc version, as well as the Linux distro used (may be the later is not entirely relevant, but please do so, if you can) to the details of this issue?
Using gcc 7.4.0 on Ubunbtu 18.04.04, following is the code generated for foo():
0000000000000610 <foo>:
610: 48 89 f8 mov rax,rdi
613: eb 06 jmp 61b <foo+0xb>
615: 0f 1f 00 nop DWORD PTR [rax]
618: 48 89 d0 mov rax,rdx
61b: 48 8b 10 mov rdx,QWORD PTR [rax]
61e: 48 85 d2 test rdx,rdx
621: 75 f5 jne 618 <foo+0x8>
623: f3 c3 repz ret
625: 66 2e 0f 1f 84 00 00 nop WORD PTR cs:[rax+rax*1+0x0]
62c: 00 00 00
62f: 90 nop
Unfortunately, the code generated with gcc 7.4.0 does not demonstrate the code pattern that triggers the malformed tool output reported in this issue. So, it would be very beneficial to get the gcc version that generates the code pattern triggering the failure, thus allowing for support to be added to correctly handle such a code pattern.
While the solution you propose seems reasonable, I would also like to look at the possibility of addressing it during BasicBlock creation.
Thanks!
from llvm-mctoll.
Hello,
Thanks you for the response. My machine is Fedora 31
gcc --version
gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)
from llvm-mctoll.
Thanks! Since I do not have immediate access to that version of gcc, can you please provide the assembly listing of foo.c
generated on your machine using the above gcc version (gcc -O3 -S foo.c
should generate foo.s
)? This would help with creation of a test case as well as allow for implementing a fix.
Any help is highly appreciated.
from llvm-mctoll.
Related Issues (20)
- Wrong lift result for nested "for" loops. HOT 2
- Unable to raise arm binary containing an array HOT 3
- Adapt mctoll to use Opaque pointers HOT 1
- This repo is missing important files
- Unknown prototype for function : _ZNSaIcEC1Ev HOT 1
- Failing to lift binaries HOT 2
- TEST8rr instruction failing to lift properly HOT 1
- Failed to lift binary (core dumped) HOT 1
- Failed to lift simple ARM binary HOT 1
- Build without LLVM source? HOT 1
- Supported LLVM version HOT 1
- assert failed at X86FuncPrototypeDiscovery.cpp:227 HOT 2
- Does Mctoll Translator support Weak Memory Model Architectures ? HOT 1
- cannot compile mctoll without assertions HOT 7
- Error while lifting. HOT 6
- Error when lifting. HOT 1
- is this project still on-going? HOT 1
- i need to install llvm mctoll HOT 3
- generate invalid llir instructions HOT 4
- Cannot get step #4 to work HOT 1
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 llvm-mctoll.