Skip to content

Dwarf FrameAddressInstruction reader errors #47

@dedmen

Description

@dedmen

case DwarfCanonicalFrameAddressInstruction.register:
dummyLocation.Register = (int)data.LEB128();
dummyLocation.Register = (int)data.LEB128();

read register twice
https://elixir.bootlin.com/linux/v5.14.14/source/arch/arc/kernel/unwind.c#L790
Its supposed to be register and register value
not register and register again

case DwarfCanonicalFrameAddressInstruction.advance_loc1:
currentAddress = data.ReadByte();
break;
case DwarfCanonicalFrameAddressInstruction.advance_loc2:
currentAddress = data.ReadUshort();
break;
case DwarfCanonicalFrameAddressInstruction.advance_loc4:
currentAddress = data.ReadUint();
break;

all these advance_loc* are wrong, they should advance the current address, not set it.

https://elixir.bootlin.com/linux/v5.14.14/source/arch/arc/kernel/unwind.c#L742

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions