FxExpression::EmitCompare doesn't handle constants properly

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
phantombeta
Posts: 2149
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

FxExpression::EmitCompare doesn't handle constants properly

Post by phantombeta »

Bugfix PR

FxExpression::EmitCompare checks for the emitted expression being constant and outputs a warning... But never does anything to handle it.
It ends up passing a constant index into opcodes expecting a register index. It seems this isn't caught in any way by the compiler backend nor the VM, but this has been causing random Invalid Instruction: cmp <None>, 1 errors in the JIT.

Steps to reproduce: (Using the attached test file)
  • Start the game with the JIT enabled.
You do not have the required permissions to view the files attached to this post.

Return to “Closed Bugs [GZDoom]”