Skip to content
  • Tom Tromey's avatar
    Fix a crash in jit.c · 2cd8cc0b
    Tom Tromey authored
    A user at Mozilla pointed out a crash in jit.c.  In his situation, an
    inferior using the JIT API exec'd an executable that did not use it.
    This caused an assertion failure when jit.c:free_objfile_data called
    delete_breakpoint with NULL.
    
    This patch fixes the problem in the obvious way.  New test case
    included.
    
    gdb/ChangeLog
    2018-12-28  Tom Tromey  <tom@tromey.com>
    
    	* jit.c (free_objfile_data): Only delete breakpoint if non-null.
    
    gdb/testsuite/ChangeLog
    2018-12-28  Tom Tromey  <tom@tromey.com>
    	    Simon Marchi <simark@simark.ca>
    
    	* gdb.base/jit-exec.exp: New file.
    	* gdb.base/jit-exec.c: New file.
    	* gdb.base/jit-execd.c: New file.
    2cd8cc0b