From: "Dmitry V. Levin" <ldv@altlinux.org> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: Re: [devel] firebird x86 error will always overflow destination buffer HELP! Date: Thu, 4 Apr 2013 17:07:57 +0400 Message-ID: <20130404130757.GB12318@altlinux.org> (raw) In-Reply-To: <CAGvFrt1hK0gDfPTTupmRay6nw+qPYBrkLvMa_mexaR9nh6OFyw@mail.gmail.com> [-- Attachment #1: Type: text/plain, Size: 2494 bytes --] On Thu, Apr 04, 2013 at 03:07:28PM +0400, Aleksey Novodvorsky wrote: > Так как бага только на i586, то, возможно, стоит уменьшить или снять оптимизацию > Rgrds, Алексей Очень мило. Отключение _FORTIFY_SOURCE - это не отключение ошибки, а всего лишь отключение проверки ошибки. Ошибка при этом никуда не денется. Фраза "will always overflow destination buffer" означает, что, по мнению gcc, если исполнение кода дойдет до указанной точки, то destination buffer overflow произойдет наверняка. > 4 апреля 2013 г., 15:01 пользователь Boris Savelev > <boris.savelev@gmail.com> написал: > > поторопился я. ошибка всё равно. только теперь на memcpy ( > > > > 4 апреля 2013 г., 14:04 пользователь Boris Savelev > > <boris.savelev@gmail.com> написал: > >> компилируется... спасибо) > >> > >> 4 апреля 2013 г., 11:42 пользователь Damir Shayhutdinov > >> <damir@altlinux.org> написал: > >>> В коде похоже есть ошибка. > >>> > >>> Можно вот так подправить: > >>> > >>> 1115 if (p1 < q && > >>> ((d = *p1++) == '_' || d == '$')) > >>> 1116 > >>> strncpy(q1 - 4, "isc", 3); > >>> 1117 else > >>> 1118 *q1++ = > >>> d; > >>> > >>> заменить на > >>> > >>> if (p1 < q) > >>> { > >>> if ((d = *p1++) == '_' || d == '$') > >>> memcpy(q1 - 4, "isc", 3); > >>> else > >>> *q1++ = d; > >>> } > >>> > >>> Правда я не уверен, что при этом проблема не исчезнет. Если не исчезнет, > >>> можно еще в строчке 1073 увеличить размер line с 256 до 260. > >>> > >>> > >>> 2013/4/4 Boris Savelev <boris@altlinux.org> > >>>> > >>>> Привет! > >>>> Помогите мне, пожалуйста, собрать firebird. > >>>> Ошибка: > >>>> In function 'char* strncpy(char*, const char*, size_t)', > >>>> inlined from 'void gen_blr(void*, SSHORT, const char*)' at > >>>> ../src/gpre/c_cxx.cpp:1116:34: > >>>> /usr/include/bits/string3.h:120:71: error: call to char* > >>>> __builtin___strncpy_chk(char*, const char*, unsigned int, unsigned > >>>> int) will always overflow destination buffer > >>>> > >>>> Лог: > >>>> http://git.altlinux.org/tasks/93764/build/100/i586/log > >>>> > >>>> Код: > >>>> > >>>> http://git.altlinux.org/people/boris/packages/?p=firebird.git;a=blob;f=Firebird/src/gpre/c_cxx.cpp;h=806bcac4ed69b8d0963c69c16f6b2c9fbd6b7852;hb=HEAD#l1116 -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-04-04 13:07 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-04-04 6:47 Boris Savelev 2013-04-04 10:04 ` Boris Savelev 2013-04-04 11:01 ` Boris Savelev 2013-04-04 11:06 ` Aleksey Novodvorsky 2013-04-04 11:07 ` Aleksey Novodvorsky 2013-04-04 13:07 ` Dmitry V. Levin [this message] 2013-04-04 17:20 ` Boris Savelev
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=20130404130757.GB12318@altlinux.org \ --to=ldv@altlinux.org \ --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