Ticket #1 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Dmangle bug

Reported by: pragma Assigned to: AgentOrange
Priority: major Milestone: Beta 1.0 - Runtime Linker
Component: Demangler (symbol parser) Version: Beta 1
Keywords: Cc:

Description (Last modified by pragma)

(submitted by AgentOrange)

hey Im starting to use the demangle module and I may have found a problem, just fyi. Im not sure exactly how this is designed so im not sure if its wrong, but its caused me problems:

public bit parseToken(char[] test)
{
  if( test.length > data.length - position ) // <-- HERE
    return false;

  if(data[position..position+test.length] == test[0..$])
  {
    position += test.length;
    return true;
  }
  return false;
}

the > was >= which caused it to reject same size strings

also just fyi theres 2 special cases as far as I can tell - _Dmain and _DWinMain - these are mangled only with a _D

thanks tho, this code is pretty nice

Change History

10/03/05 18:18:59 changed by brad

  • description changed.

10/05/05 10:29:26 changed by pragma

  • owner changed from pragma to AgentOrange.
  • description changed.

12/01/05 23:30:37 changed by pragma

  • status changed from new to closed.
  • resolution set to fixed.

It took too long for me to get around to this one, but the fix was easy enough. I fixed the comparison operator and added two more special types to the listing of symbol types.