[devel] [PATCH for apt 2/2 v2] Fix pointer arithmetics

Dmitry V. Levin ldv на altlinux.org
Пн Дек 9 01:56:20 MSK 2019

On Sat, Dec 07, 2019 at 05:52:01PM +0300, Andrey Savchenko wrote:
> Hi all!
> On Fri,  6 Dec 2019 18:36:55 +0300 Aleksei Nikiforov wrote:
> > This change should fix pointer arithmetic issues for e2k.
> This commit message is misleading. Pointer arithmetic is broken on
> all architectures, but by pure chance in happens to work correctly
> when gcc is used. On e2k the lcc compiler is used, so problem
> manifests itself. But this doesn't change the fact that pointer
> arithmetic was flawed on all architectures.

Strictly speaking, it's not "broken", it's "UB", but I agree
it is not specific to e2k.

My original commit message for this change was the following:

"Fix UB in pointer arithmetic

Commit 6d5e6a689d07de8feef2cbecb24bc42d5994861b aka 0.5.15lorg2-alt70~9
among other changes introduced UB in pointer arithmetic by casting raw
pointers to specific types."

----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : signature.asc
Тип     : application/pgp-signature
Размер  : 801 байтов
Описание: отсутствует
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20191209/9b7550c9/attachment.bin>

Подробная информация о списке рассылки Devel