{"action":"created","issue":{"url":"https://api.github.com/repos/angr/simuvex/issues/12","repository_url":"https://api.github.com/repos/angr/simuvex","labels_url":"https://api.github.com/repos/angr/simuvex/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/angr/simuvex/issues/12/comments","events_url":"https://api.github.com/repos/angr/simuvex/issues/12/events","html_url":"https://github.com/angr/simuvex/issues/12","id":141367047,"number":12,"title":"AttributeError: 'long' object has no attribute 'size'","user":{"login":"frederic","id":21579,"avatar_url":"https://avatars.githubusercontent.com/u/21579?v=3","gravatar_id":"","url":"https://api.github.com/users/frederic","html_url":"https://github.com/frederic","followers_url":"https://api.github.com/users/frederic/followers","following_url":"https://api.github.com/users/frederic/following{/other_user}","gists_url":"https://api.github.com/users/frederic/gists{/gist_id}","starred_url":"https://api.github.com/users/frederic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederic/subscriptions","organizations_url":"https://api.github.com/users/frederic/orgs","repos_url":"https://api.github.com/users/frederic/repos","events_url":"https://api.github.com/users/frederic/events{/privacy}","received_events_url":"https://api.github.com/users/frederic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-16T18:49:30Z","updated_at":"2016-06-04T23:16:32Z","closed_at":null,"body":"When I use the CONCRETIZE option, the following error happens: \r\n```\r\nTraceback (most recent call last):\r\n  File \"./angr-test.py\", line 142, in <module>\r\n    dot = analyze_paths(p, p.addr, dot)\r\n  File \"./angr-test.py\", line 40, in analyze_paths\r\n    parent_p.step()\r\n  File \"/home/user/tools/code/angr-dev/angr/angr/path.py\", line 432, in step\r\n    self._make_sim_run()\r\n  File \"/home/user/tools/code/angr-dev/angr/angr/path.py\", line 457, in _make_sim_run\r\n    self._run = self._project.factory.sim_run(self.state, **self._run_args)\r\n  File \"/home/user/tools/code/angr-dev/angr/angr/factory.py\", line 123, in sim_run\r\n    r = self.sim_block(state, addr=addr, **block_opts)\r\n  File \"/home/user/tools/code/angr-dev/angr/angr/factory.py\", line 69, in sim_block\r\n    last_stmt=last_stmt)\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/irsb.py\", line 62, in __init__\r\n    self._handle_irsb()\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/irsb.py\", line 92, in _handle_irsb\r\n    self._handle_statements()\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/irsb.py\", line 208, in _handle_statements\r\n    s_stmt = translate_stmt(self.irsb, stmt_idx, self.last_imark, self.state)\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/statements/__init__.py\", line 31, in translate_stmt\r\n    s.process()\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/statements/base.py\", line 26, in process\r\n    self._execute()\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/statements/wrtmp.py\", line 6, in _execute\r\n    data = self._translate_expr(self.stmt.data)\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/statements/base.py\", line 36, in _translate_expr\r\n    e = translate_expr(expr, self.imark, self.stmt_idx, self.state)\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/expressions/__init__.py\", line 14, in translate_expr\r\n    e.process()\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/expressions/base.py\", line 38, in process\r\n    self._execute()\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/expressions/get.py\", line 24, in _execute\r\n    self._post_process()\r\n  File \"/home/user/tools/code/angr-dev/simuvex/simuvex/vex/expressions/base.py\", line 59, in _post_process\r\n    if self.expr.size() != self.size_bits():\r\nAttributeError: 'long' object has no attribute 'size'\r\n```\r\nIn https://github.com/angr/simuvex/blob/master/simuvex/vex/expressions/base.py#L94 make_concrete(self), the **expr** member is replaced by a long variable. So all subsequent calls to expr.to_bv() or expr.size() won't work.\r\n\r\nMaybe we should create an BVV object : \r\nself.expr = self.state.se.BVV(concrete_value, self.size_bits())\r\n\r\nBut I am not sure if we should add contraints (#L92 & #L93) based on BVV object or the original long value."},"comment":{"url":"https://api.github.com/repos/angr/simuvex/issues/comments/223783565","html_url":"https://github.com/angr/simuvex/issues/12#issuecomment-223783565","issue_url":"https://api.github.com/repos/angr/simuvex/issues/12","id":223783565,"user":{"login":"zardus","id":3453847,"avatar_url":"https://avatars.githubusercontent.com/u/3453847?v=3","gravatar_id":"","url":"https://api.github.com/users/zardus","html_url":"https://github.com/zardus","followers_url":"https://api.github.com/users/zardus/followers","following_url":"https://api.github.com/users/zardus/following{/other_user}","gists_url":"https://api.github.com/users/zardus/gists{/gist_id}","starred_url":"https://api.github.com/users/zardus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zardus/subscriptions","organizations_url":"https://api.github.com/users/zardus/orgs","repos_url":"https://api.github.com/users/zardus/repos","events_url":"https://api.github.com/users/zardus/events{/privacy}","received_events_url":"https://api.github.com/users/zardus/received_events","type":"User","site_admin":false},"created_at":"2016-06-04T23:16:32Z","updated_at":"2016-06-04T23:16:32Z","body":"Hello, do you have a testcase that triggers this?"}}
{"actor":{"display_login":"zardus"}}