From: Alexei Takaseev <alexei@taf.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] dvblast-2.2-alt4: Sisyphus/x86_64 test rebuild failed
Date: Wed, 3 Oct 2012 17:02:59 +0900 (IRKT)
Message-ID: <20177416.115.1349251377779.JavaMail.taf@taf.ilimnet.ru> (raw)
In-Reply-To: <20121002101608.4762b936@deimos.localdomain>
----- Исходное сообщение -----
> От: "Ivan A. Melnikov" <iv@altlinux.org>
> Кому: devel@lists.altlinux.org
> Отправленные: Вторник, 2 Октябрь 2012 г 15:16:08
> Тема: Re: [devel] dvblast-2.2-alt4: Sisyphus/x86_64 test rebuild failed
>
>
> Посмотрел на код. По-моему, как-то так:
>
> On Tue, 2 Oct 2012 14:13:46 +0900 (IRKT)
> Alexei Takaseev <alexei@taf.ru> wrote:
> [...]
> > > inlined from 'TPDUSend.constprop.35' at en50221.c:318:19,
>
> Тут выделяется буфер размером MAX_TPDU_SIZE (4096) байт, затем туда
> пишется заголовок (3 каких-то байта, хитро закодированная длинна
> данных i_lenght, ещё один байт) и данные размером i_length.
>
> > > inlined from 'SPDUSend' at en50221.c:500:26:
>
> Тут в ту функцию выше передаются данные размером MAX_TPDU_DATA (4096
> - 4) байт.
>
> > > /usr/include/bits/string3.h:51:3: error: call to
> > > __builtin___memcpy_chk will always overflow destination buffer
>
> Тут компилятор справедливо замечает, что
>
> 3 + (длина поля size) + 1 + (4096 - 4) > 4096
>
> на размер хитро закодированной длины (в нашем случае 3 байта).
>
> > > make: *** [en50221.o] Error 1
> > > make: Leaving directory `/usr/src/RPM/BUILD/dvblast-2.2'
> > > error: Bad exit status from /usr/src/tmp/rpm-tmp.33481 (%build)
> >
> > Подскажите, пожалуйста, куда копать в данном случае? На i586 сборка
> > проходит нормально.
>
> Нужно знать особенности формата. Можно рискнуть уменьшить
> MAX_TPDU_DATA
> ещё на 3 (откомпилироваться помогает), но не знаю, поймут ли это те,
> кто
> эти данные читает.
Спасибо! MAX_TPDU_DATA-7 помогло собраться. По ходу, автор упустил реальный
размер i_length в памяти. На реальных данных переполнения не происходило (там
оперируют блоками до 200 байт), но апстрим уже разбирается, откуда у них
3 лишних байта вылезло.
prev parent reply other threads:[~2012-10-03 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 5:13 ` Alexei Takaseev
2012-10-02 6:16 ` Ivan A. Melnikov
2012-10-03 8:02 ` Alexei Takaseev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20177416.115.1349251377779.JavaMail.taf@taf.ilimnet.ru \
--to=alexei@taf.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git