guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 309/437: Do not fail if NULL is passed to init_jit.


From: Andy Wingo
Subject: [Guile-commits] 309/437: Do not fail if NULL is passed to init_jit.
Date: Mon, 2 Jul 2018 05:14:42 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 1d75fe625af6020f88b7977810ed7a66c47d7bf3
Author: pcpa <address@hidden>
Date:   Tue Oct 14 17:03:51 2014 -0300

    Do not fail if NULL is passed to init_jit.
    
    This should just tell to disable the disassembler.
---
 lib/jit_disasm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index 361200e..c80c9e2 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -59,6 +59,8 @@ static jit_state_t             *disasm_jit;
 void
 jit_init_debug(char *progname)
 {
+    if (progname == NULL)
+       return;
 #if DISASSEMBLER
     bfd_init();
 
@@ -197,7 +199,8 @@ void
 _jit_disassemble(jit_state_t *_jit)
 {
 #if DISASSEMBLER
-    disassemble(_jit->code.ptr, _jit->pc.uc - _jit->code.ptr);
+    if (disasm_bfd)
+       disassemble(_jit->code.ptr, _jit->pc.uc - _jit->code.ptr);
 #endif
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]