Returned Name as Class leads to Very Fatal Error

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Returned Name as Class leads to Very Fatal Error

Re: Returned Name as Class leads to Very Fatal Error

by dpJudas » Sun Dec 09, 2018 11:42 am

Yes. Although this is one of the first we encountered and is easily avoided by emitting slightly different code.

When using 64-bit constants in certain situations asmjit emits the wrong opcode, or mysteriously replaces the top 32 bits with 0xffffffff. The disassembly _mental_ pasted looks perfectly right, but what it actually emitted was the equivalent of "mov qword [rax], 0xffffffff69906048 ; mov qword [tmpPtr0], 105553169906048".

Re: Returned Name as Class leads to Very Fatal Error

by Graf Zahl » Sun Dec 09, 2018 11:19 am

So, another Asmjit bug?

Re: Returned Name as Class leads to Very Fatal Error

by dpJudas » Sun Dec 09, 2018 10:37 am

Fixed in f0ce453.

Re: Returned Name as Class leads to Very Fatal Error

by _mental_ » Sun Dec 09, 2018 9:39 am

It's some sort of non-tirivial problem with JIT. The sample works correctly without it.
Spoiler: Source code
Spoiler: Assembly
In the assembly above the place marked with crash! contains bogus (truncated?) value in RDX.

Returned Name as Class leads to Very Fatal Error

by Guest » Thu Dec 06, 2018 8:04 pm

http://edthebat.com/doom/classnamebugtest.pk3

See example.
If a class is defined by a function which returns a name, attempting to retrieve the name of said class either via explicit casting or GetClassName() will result in a Very Fatal Error.

Issue is present as recent as Devbuild 3.7pre-746-ge83af1590 (Dec 6, 2018)

Top