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

TypeError: unsupported operand type(s) for /: 'FP' and 'FP' #135

Closed
elklepo opened this issue Mar 25, 2019 · 4 comments
Closed

TypeError: unsupported operand type(s) for /: 'FP' and 'FP' #135

elklepo opened this issue Mar 25, 2019 · 4 comments

Comments

@elklepo
Copy link

elklepo commented Mar 25, 2019

import angr, claripy

s = claripy.Solver()

b = claripy.FPS('b', claripy.FSORT_DOUBLE)
c = claripy.FPS('c', claripy.FSORT_DOUBLE)

s.add(b / c)

When I try to execute above script I get following error:

Traceback (most recent call last):
File "exploit.py", line 8, in
s.add(b / c)
TypeError: unsupported operand type(s) for /: 'FP' and 'FP'

It seems that only operator / is broken for FPS() class, other operators work just fine.

I'm working in virtual env on latest angr form apt repository.

@rhelmot
Copy link
Member

rhelmot commented Mar 25, 2019

I can't reproduce this. Can you post your python -m angr.misc.bug_report?

Also, angr is not installable from apt so far as I know. What?

@elklepo
Copy link
Author

elklepo commented Mar 25, 2019

@rhelmot I'm sorry, not apt but pip. Here is output from python -m angr.misc.bug_report:

angr environment report

Date: 2019-03-25 22:34:53.960796
Running in virtual environment at /home/elklepo/.virtualenvs/angr
Platform: linux-x86_64
Python version: 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
######## angr #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/angr
Pip version angr 8.19.2.4
Couldn't find git info
######## ailment #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/ailment
Pip version ailment 8.19.2.4
Couldn't find git info
######## cle #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/cle
Pip version cle 8.19.2.4
Couldn't find git info
######## pyvex #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/pyvex
Pip version pyvex 8.19.2.4
Couldn't find git info
######## claripy #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/claripy
Pip version claripy 8.19.2.4
Couldn't find git info
######## archinfo #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/archinfo
Pip version archinfo 8.19.2.4
Couldn't find git info
######## ana #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/ana
Pip version ana 0.5
Couldn't find git info
######## z3 #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/z3
Pip version not found!
Couldn't find git info
######## unicorn #########
Python found it in /home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/unicorn
Pip version unicorn 1.0.1
Couldn't find git info
######### Native Module Info ##########
angr: <CDLL '/home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/angr/lib/angr_native.so', handle 2b0bbb0 at 0x7f65cd870fd0>
unicorn: <CDLL '/home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/unicorn/lib/libunicorn.so', handle 26ab370 at 0x7f65d07950b8>
pyvex: <cffi.api._make_ffi_library..FFILibrary object at 0x7f65d13db828>
z3: <CDLL '/home/elklepo/.virtualenvs/angr/lib/python3.6/site-packages/z3/lib/libz3.so', handle 310f7c0 at 0x7f65d32fceb8>

@rhelmot
Copy link
Member

rhelmot commented Mar 25, 2019

Ah! it looks like this was actually resolved a few days after the last release. This is resolved on master as of #125. I'll make a new release as soon as I work through my issue backlog.

@elklepo
Copy link
Author

elklepo commented Mar 25, 2019

@rhelmot
Thank You very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants