svn commit: r1186 - trunk/yasm/modules/arch/x86

peter at tortall.net peter at tortall.net
Thu Dec 2 22:09:31 PST 2004


Author: peter
Date: Thu Dec  2 22:09:30 2004
New Revision: 1186

Modified:
   trunk/yasm/modules/arch/x86/x86arch.h
   trunk/yasm/modules/arch/x86/x86bc.c
   trunk/yasm/modules/arch/x86/x86id.re
Changeset:
   http://www.tortall.net/projects/yasm/changeset/1186
Log:
Fix free-before-use case in x86 finalize code.  Bytecode transformation
deletes the old bytecode, so it's not safe to use anything from the old
bytecode after this point (such as the prefixes array passed to arch
finalize).

 * x86bc.c (yasm_x86__bc_apply_prefixes): Take x86_common as parameter
rather than bytecode; add line parameter instead of referencing bc->line.
 * x86arch.h (yasm_x86__bc_apply_prefixes): Likewise.
 * x86id.re (x86_finalize_jmpfar, x86_finalize_jmp)
(yasm_x86__finalize_insn): Apply prefixes before bytecode transform.





More information about the yasm-cvs mailing list