Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dwarf FrameAddressInstruction reader errors #47

Open
dedmen opened this issue Oct 22, 2021 · 0 comments
Open

Dwarf FrameAddressInstruction reader errors #47

dedmen opened this issue Oct 22, 2021 · 0 comments

Comments

@dedmen
Copy link

dedmen commented Oct 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant