]> granicus.if.org Git - yasm/commit
Fix free-before-use case in x86 finalize code. Bytecode transformation
authorPeter Johnson <peter@tortall.net>
Fri, 3 Dec 2004 06:09:30 +0000 (06:09 -0000)
committerPeter Johnson <peter@tortall.net>
Fri, 3 Dec 2004 06:09:30 +0000 (06:09 -0000)
commit7c23a1e805b2a9f41b1e9c6e7edd989ea3033be2
treee90fa960a7f0f4123ac1bf5d65100e6849509c8e
parentec66889b7d365664028946c8aeee05910c054010
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.

svn path=/trunk/yasm/; revision=1186
modules/arch/x86/x86arch.h
modules/arch/x86/x86bc.c
modules/arch/x86/x86id.re