[Rpm-maint] [rpm-software-management/rpm] Undefined pointer comparison in macro.c (#1602)

Demi Marie Obenour notifications at github.com
Fri Mar 26 07:40:49 UTC 2021


GCC has `-fsanitize=pointer-compare`, which adds instrumentation to detect invalid pointer comparisons.  When built with this flag, and run with `ASAN_OPTIONS=detect_invalid_pointer_pairs=1`, virtually the entire testsuite fails due to [an undefined pointer comparison][1] in `rpmio/macro.c`.  This is in turn due to [`q` being initialized as one before the beginning of an allocated region][2].

Reproduction script below.  PR coming.

[1]: https://github.com/rpm-software-management/rpm/blob/e838c489dbbf37c0476c423a7555ad4672eb075d/rpmio/macro.c#L229
[2]: https://github.com/rpm-software-management/rpm/blob/e838c489dbbf37c0476c423a7555ad4672eb075d/rpmio/macro.c#L212


[build-rpm.gz](https://github.com/rpm-software-management/rpm/files/6210103/build-rpm.gz)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1602
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210326/f61a1be8/attachment.html>


More information about the Rpm-maint mailing list