This is an archive of the discontinued LLVM Phabricator instance.

[dsymutil] Ensure PC offsets with within specified bit width
AbandonedPublic

Authored by vsk on Sep 3 2015, 3:00 PM.

Details

Reviewers
friss
Summary

Fixes a bug where dsymutil did not truncate negative PC offsets to the specified width. E.g: if "Low + LocPcOffset" is negative and AddressSize is 4, the bits 32..63 are high, which causes EmitIntValue to assertion-fail.

Diff Detail

Event Timeline

vsk updated this revision to Diff 33979.Sep 3 2015, 3:00 PM
vsk retitled this revision from to [dsymutil] Ensure PC offsets with within specified bit width.
vsk updated this object.
vsk added a reviewer: friss.
vsk added a subscriber: llvm-commits.
friss edited edge metadata.Sep 3 2015, 7:18 PM

I'm not sure we should fix this. The fact that we get this assertion means that the link did something wrong, and most likely we should fix the issue there. We shouldn't end up with negative/overflowing addresses here.

It might be that for some reason getting this is unavoidable, but I want to understand the root cause first.

vsk abandoned this revision.Sep 4 2015, 10:36 AM

Fred's right, we can come back to this later if needed.