[svn:parrot] r46058 - trunk/src

fperrad at svn.parrot.org fperrad at svn.parrot.org
Tue Apr 27 13:14:12 UTC 2010


Author: fperrad
Date: Tue Apr 27 13:14:11 2010
New Revision: 46058
URL: https://trac.parrot.org/parrot/changeset/46058

Log:
fix segmentation fault of pbc_disassemble.exe on mingw

(gdb) bt
#0  0x686d491d in PDB_free_file (interp=0x3f4050, file=0xbaadf00d)
    at src/debug.c:2745
#1  0x686d4a75 in PDB_disassemble (interp=0x3f4050, command_unused=0x0)
    at src/debug.c:2612
#2  0x686d87a2 in Parrot_disassemble (interp=0x3f4050, outfile=0x0, options=0)
    at src/embed.c:969
#3  0x00401385 in do_dis (interp=0x3f4050, outfile=0x0, options=0)
    at src/pbc_disassemble.c:161
#4  0x00401527 in main (argc=1, argv=0x3f402c) at src/pbc_disassemble.c:141

Modified:
   trunk/src/embed.c

Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c	Tue Apr 27 13:10:11 2010	(r46057)
+++ trunk/src/embed.c	Tue Apr 27 13:14:11 2010	(r46058)
@@ -948,7 +948,7 @@
 Parrot_disassemble(PARROT_INTERP, ARGIN(const char *outfile), Parrot_disassemble_options options)
 {
     PDB_line_t *line;
-    PDB_t * const pdb   = mem_gc_allocate_typed(interp, PDB_t);
+    PDB_t * const pdb   = mem_gc_allocate_zeroed_typed(interp, PDB_t);
     int num_mappings    = 0;
     int curr_mapping    = 0;
     int op_code_seq_num = 0;


More information about the parrot-commits mailing list