This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] Fix Len argument type in call to __dfsan_mem_transfer_callback
ClosedPublic

Authored by EliaGeretto on Apr 22 2021, 4:21 AM.

Details

Summary

This patch is supposed to solve: https://bugs.llvm.org/show_bug.cgi?id=50075

The function __dfsan_mem_transfer_callback takes a Len argument of type i64; however, when processing a MemTransferInst such as llvm.memcpy.p0i8.p0i8.i32, the len argument has type i32. In order to make the type of len compatible with the one of the callback argument, this change zero-extends it when necessary.

Diff Detail

Event Timeline

EliaGeretto created this revision.Apr 22 2021, 4:21 AM
EliaGeretto requested review of this revision.Apr 22 2021, 4:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2021, 4:21 AM

The CI failure is unrelated to this change; however, I cannot restart the build myself it seems.

Thank you for fixing this.

This revision is now accepted and ready to land.Apr 22 2021, 10:40 AM
EliaGeretto added a comment.EditedApr 22 2021, 10:45 AM

@stephan.yichao.zhao No problem. However, I do not have push access, could you please push this on my behalf? Thank you.

@stephan.yichao.zhao No problem. However, I do not have push access, could you please push this on my behalf? Thank you.

Sure. will be doing it today.

gbalats accepted this revision.Apr 22 2021, 10:49 AM
This revision was landed with ongoing or failed builds.Apr 22 2021, 2:13 PM
This revision was automatically updated to reflect the committed changes.

@stephan.yichao.zhao Thank you for pushing this. I have a question, though. The commit shows the following line:

From: Elia Geretto <EliaGeretto>

That, however, should have been:

From: Elia Geretto <elia.f.geretto@gmail.com>

I am now wondering if my account on Differential has some issue, do you know the reason for this? Did I do something wrong submitting the patch?

I am now wondering if my account on Differential has some issue, do you know the reason for this? Did I do something wrong submitting the patch?

It turned out that in my submit I used "author" as Elia Geretto <EliaGeretto>, while it should have been Elia Geretto <elia.f.geretto@gmail.com>.
With this issue, only review.llvm.org knows you are the author because of EliaGeretto, while github does not...
Sorry about this.

It is fine, no problem. I just wanted to make sure that the configuration etc. on my side was correct.