[Fixed] Returned Name as Class leads to Very Fatal Error

Bugs that have been investigated and resolved somehow.

Moderator: Developers

Returned Name as Class leads to Very Fatal Error

Postby Clara Duckhood » Thu Dec 06, 2018 9: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)
Clara Duckhood
 

Re: Returned Name as Class leads to Very Fatal Error

Postby _mental_ » Sun Dec 09, 2018 10: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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Returned Name as Class leads to Very Fatal Error

Postby dpJudas » Sun Dec 09, 2018 11:37 am

Fixed in f0ce453.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Returned Name as Class leads to Very Fatal Error

Postby Graf Zahl » Sun Dec 09, 2018 12:19 pm

So, another Asmjit bug?
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Returned Name as Class leads to Very Fatal Error

Postby dpJudas » Sun Dec 09, 2018 12:42 pm

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".
dpJudas
 
 
 
Joined: 28 May 2016


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests