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

Segmentation fault in PyVex #2

Closed
badnack opened this issue Nov 4, 2013 · 3 comments
Closed

Segmentation fault in PyVex #2

badnack opened this issue Nov 4, 2013 · 3 comments

Comments

@badnack
Copy link
Contributor

badnack commented Nov 4, 2013

Here it is the backtrace:
#0 wrap_IRExpr (i=0x0) at pyvex/pyvex_irexpr.c:64
#1 0x00007ffff4a90155 in pyIRStmtCAS_get_expdHi (self=, closure=)

at pyvex/pyvex_irstmt.c:363

#2 0x00000000004bd718 in ?? ()
#3 0x00000000004c6d6a in _PyObject_GenericGetAttrWithDict ()
#4 0x00000000004662fe in PyEval_EvalFrameEx ()
#5 0x0000000000466a42 in PyEval_EvalFrameEx ()
#6 0x000000000057bd02 in PyEval_EvalCodeEx ()
#7 0x000000000057dcd0 in ?? ()
#8 0x00000000004bf2a6 in PyObject_Call ()
#9 0x00000000004a4b8a in ?? ()
#10 0x00000000004bf2a6 in PyObject_Call ()
#11 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords ()
#12 0x00000000004ef31b in PyInstance_New ()
#13 0x00000000004bf2a6 in PyObject_Call ()
#14 0x00000000004668da in PyEval_EvalFrameEx ()
#15 0x0000000000466a42 in PyEval_EvalFrameEx ()
#16 0x000000000057bd02 in PyEval_EvalCodeEx ()
#17 0x000000000057de02 in ?? ()
#18 0x00000000004bf2a6 in PyObject_Call ()
#19 0x00000000004a4b8a in ?? ()
#20 0x00000000004bf2a6 in PyObject_Call ()
#21 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords ()
#22 0x00000000004ef31b in PyInstance_New ()
#23 0x00000000004bf2a6 in PyObject_Call ()
#24 0x00000000004668da in PyEval_EvalFrameEx ()
#25 0x0000000000466a42 in PyEval_EvalFrameEx ()
#26 0x0000000000466a42 in PyEval_EvalFrameEx ()
#27 0x000000000057bd02 in PyEval_EvalCodeEx ()
#28 0x00000000004667f8 in PyEval_EvalFrameEx ()
#29 0x000000000057bd02 in PyEval_EvalCodeEx ()
#30 0x000000000057de02 in ?? ()
#31 0x00000000004bf2a6 in PyObject_Call ()
#32 0x0000000000467e60 in PyEval_EvalFrameEx ()
#33 0x000000000057bd02 in PyEval_EvalCodeEx ()
#34 0x00000000004667f8 in PyEval_EvalFrameEx ()
#35 0x0000000000466a42 in PyEval_EvalFrameEx ()
#36 0x0000000000466a42 in PyEval_EvalFrameEx ()
#37 0x0000000000466a42 in PyEval_EvalFrameEx ()
#38 0x0000000000466a42 in PyEval_EvalFrameEx ()
#39 0x0000000000466a42 in PyEval_EvalFrameEx ()
#40 0x0000000000466a42 in PyEval_EvalFrameEx ()
#41 0x0000000000466a42 in PyEval_EvalFrameEx ()
#42 0x000000000057bd02 in PyEval_EvalCodeEx ()
#43 0x000000000057c77d in PyRun_FileExFlags ()
#44 0x000000000057e4a1 in PyRun_SimpleFileExFlags ()
#45 0x0000000000512cfd in Py_Main ()
#46 0x00007ffff68cb76d in __libc_start_main (main=0x41ba20

, argc=2, ubp_av=0x7fffffffe418,

init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe408)
at libc-start.c:226

#47 0x000000000041ba51 in _start ()

The fault is due to a null value:
// wrap functionality
60 PyObject *wrap_IRExpr(IRExpr *i)
61 {
62 PyTypeObject *t = NULL;
63
64 switch (i->tag)
65 {

(gdb) p i
$1 = (IRExpr *) 0x0

If you need my binary, contact me.

@zardus
Copy link
Member

zardus commented Nov 5, 2013

Alright, so I it looks like this is caused by a NULL expdHi. I pushed a fix
in pyvex that'll at least prevent the segfault, instead returning None. I
also pushed a fix for the CAS code. Could you try that out? Also, I can't
seem to get this reproduced properly; can you send me the binary if there
are still issues?

On Mon, Nov 4, 2013 at 3:56 PM, Nilo Redini notifications@github.comwrote:

Here it is the backtrace:
#0 wrap_IRExpr (i=0x0) at pyvex/pyvex_irexpr.c:64
#1 #1 0x00007ffff4a90155 in
pyIRStmtCAS_get_expdHi (self=, closure=)
at pyvex/pyvex_irstmt.c:363
#2 #2 0x00000000004bd718 in ?? ()
#3 0x00000000004c6d6a in _PyObject_GenericGetAttrWithDict ()
#4 0x00000000004662fe in PyEval_EvalFrameEx ()
#5 0x0000000000466a42 in PyEval_EvalFrameEx ()
#6 0x000000000057bd02 in PyEval_EvalCodeEx ()
#7 0x000000000057dcd0 in ?? ()
#8 0x00000000004bf2a6 in PyObject_Call ()
#9 0x00000000004a4b8a in ?? ()
#10 0x00000000004bf2a6 in PyObject_Call ()
#11 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords ()
#12 0x00000000004ef31b in PyInstance_New ()
#13 0x00000000004bf2a6 in PyObject_Call ()
#14 0x00000000004668da in PyEval_EvalFrameEx ()
#15 0x0000000000466a42 in PyEval_EvalFrameEx ()
#16 0x000000000057bd02 in PyEval_EvalCodeEx ()
#17 0x000000000057de02 in ?? ()
#18 0x00000000004bf2a6 in PyObject_Call ()
#19 0x00000000004a4b8a in ?? ()
#20 0x00000000004bf2a6 in PyObject_Call ()
#21 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords ()
#22 0x00000000004ef31b in PyInstance_New ()
#23 0x00000000004bf2a6 in PyObject_Call ()
#24 0x00000000004668da in PyEval_EvalFrameEx ()
#25 0x0000000000466a42 in PyEval_EvalFrameEx ()
#26 0x0000000000466a42 in PyEval_EvalFrameEx ()
#27 0x000000000057bd02 in PyEval_EvalCodeEx ()
#28 0x00000000004667f8 in PyEval_EvalFrameEx ()
#29 0x000000000057bd02 in PyEval_EvalCodeEx ()
#30 0x000000000057de02 in ?? ()
#31 0x00000000004bf2a6 in PyObject_Call ()
#32 0x0000000000467e60 in PyEval_EvalFrameEx ()
#33 0x000000000057bd02 in PyEval_EvalCodeEx ()
#34 0x00000000004667f8 in PyEval_EvalFrameEx ()
#35 0x0000000000466a42 in PyEval_EvalFrameEx ()
#36 0x0000000000466a42 in PyEval_EvalFrameEx ()
#37 0x0000000000466a42 in PyEval_EvalFrameEx ()
#38 0x0000000000466a42 in PyEval_EvalFrameEx ()
#39 0x0000000000466a42 in PyEval_EvalFrameEx ()
#40 0x0000000000466a42 in PyEval_EvalFrameEx ()
#41 0x0000000000466a42 in PyEval_EvalFrameEx ()
#42 0x000000000057bd02 in PyEval_EvalCodeEx ()
#43 0x000000000057c77d in PyRun_FileExFlags ()
#44 0x000000000057e4a1 in PyRun_SimpleFileExFlags ()
#45 0x0000000000512cfd in Py_Main ()
#46 0x00007ffff68cb76d in __libc_start_main (main=0x41ba20 , argc=2,
ubp_av=0x7fffffffe418,
init=, fini=, rtld_fini=, stack_end=0x7fffffffe408)
at libc-start.c:226
#47 0x000000000041ba51 in _start ()

If you need my binary, contact me.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2
.

@badnack
Copy link
Contributor Author

badnack commented Nov 5, 2013

Ok, I cannot pull anything from here, I'll let you know tomorrow morning. Thanks!

Nilo

Nilo Redini
Facebook: Nilo Redini
Google-talk: n.redini@gmail.com
Twitter: badnack
Skype: badnack
WebSite: www.badnack.it
PGP public key: www.badnack.it/Keys/PbKey

On 04/nov/2013, at 11:23 PM, Yan notifications@github.com wrote:

Alright, so I it looks like this is caused by a NULL expdHi. I pushed a fix
in pyvex that'll at least prevent the segfault, instead returning None. I
also pushed a fix for the CAS code. Could you try that out? Also, I can't
seem to get this reproduced properly; can you send me the binary if there
are still issues?

On Mon, Nov 4, 2013 at 3:56 PM, Nilo Redini notifications@github.comwrote:

Here it is the backtrace:
#0 wrap_IRExpr (i=0x0) at pyvex/pyvex_irexpr.c:64
#1 #1 0x00007ffff4a90155 in
pyIRStmtCAS_get_expdHi (self=, closure=)
at pyvex/pyvex_irstmt.c:363
#2 #2 0x00000000004bd718 in ?? ()
#3 0x00000000004c6d6a in _PyObject_GenericGetAttrWithDict ()
#4 0x00000000004662fe in PyEval_EvalFrameEx ()
#5 0x0000000000466a42 in PyEval_EvalFrameEx ()
#6 0x000000000057bd02 in PyEval_EvalCodeEx ()
#7 0x000000000057dcd0 in ?? ()
#8 0x00000000004bf2a6 in PyObject_Call ()
#9 0x00000000004a4b8a in ?? ()
#10 0x00000000004bf2a6 in PyObject_Call ()
#11 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords ()
#12 0x00000000004ef31b in PyInstance_New ()
#13 0x00000000004bf2a6 in PyObject_Call ()
#14 0x00000000004668da in PyEval_EvalFrameEx ()
#15 0x0000000000466a42 in PyEval_EvalFrameEx ()
#16 0x000000000057bd02 in PyEval_EvalCodeEx ()
#17 0x000000000057de02 in ?? ()
#18 0x00000000004bf2a6 in PyObject_Call ()
#19 0x00000000004a4b8a in ?? ()
#20 0x00000000004bf2a6 in PyObject_Call ()
#21 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords ()
#22 0x00000000004ef31b in PyInstance_New ()
#23 0x00000000004bf2a6 in PyObject_Call ()
#24 0x00000000004668da in PyEval_EvalFrameEx ()
#25 0x0000000000466a42 in PyEval_EvalFrameEx ()
#26 0x0000000000466a42 in PyEval_EvalFrameEx ()
#27 0x000000000057bd02 in PyEval_EvalCodeEx ()
#28 0x00000000004667f8 in PyEval_EvalFrameEx ()
#29 0x000000000057bd02 in PyEval_EvalCodeEx ()
#30 0x000000000057de02 in ?? ()
#31 0x00000000004bf2a6 in PyObject_Call ()
#32 0x0000000000467e60 in PyEval_EvalFrameEx ()
#33 0x000000000057bd02 in PyEval_EvalCodeEx ()
#34 0x00000000004667f8 in PyEval_EvalFrameEx ()
#35 0x0000000000466a42 in PyEval_EvalFrameEx ()
#36 0x0000000000466a42 in PyEval_EvalFrameEx ()
#37 0x0000000000466a42 in PyEval_EvalFrameEx ()
#38 0x0000000000466a42 in PyEval_EvalFrameEx ()
#39 0x0000000000466a42 in PyEval_EvalFrameEx ()
#40 0x0000000000466a42 in PyEval_EvalFrameEx ()
#41 0x0000000000466a42 in PyEval_EvalFrameEx ()
#42 0x000000000057bd02 in PyEval_EvalCodeEx ()
#43 0x000000000057c77d in PyRun_FileExFlags ()
#44 0x000000000057e4a1 in PyRun_SimpleFileExFlags ()
#45 0x0000000000512cfd in Py_Main ()
#46 0x00007ffff68cb76d in __libc_start_main (main=0x41ba20 , argc=2,
ubp_av=0x7fffffffe418,
init=, fini=, rtld_fini=, stack_end=0x7fffffffe408)
at libc-start.c:226
#47 0x000000000041ba51 in _start ()

If you need my binary, contact me.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2
.


Reply to this email directly or view it on GitHub.

@zardus
Copy link
Member

zardus commented Nov 5, 2013

Merged your fix. Thanks!

@zardus zardus closed this as completed Nov 5, 2013
zardus added a commit that referenced this issue May 27, 2015
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