Coverage hooks that take less-than-64-bit-integers as parameters need the zeroext parameter attribute (http://llvm.org/docs/LangRef.html#paramattrs) to make sure they are properly extended by the x86_64 ABI.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Please go over other sanitizer APIs and check if we have any other i8/16/32 args. dfsan?
lib/Transforms/Instrumentation/SanitizerCoverage.cpp | ||
---|---|---|
255 | I guess this should be arch-dependent because this is part of ABI. However, probably we don't care. But a comment would not harm, this is tricky. |
Comment Actions
Reid Kleckner mentioned on llvm-dev that the extension should be performed for i8 and i16, but not i32.
I couldn't find any decent info about zero extension in the x86_64 ABI documentation, but I think having it for i32 won't hurt anyway.
WDYT?
I guess this should be arch-dependent because this is part of ABI. However, probably we don't care. But a comment would not harm, this is tricky.