From: Hihin Ruslan <ruslandh@gmail.com>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] Ошибка выделения памяти в malloc в 32-х битной архитектуре
Date: Sat, 25 Jul 2015 18:39:28 +0300
Message-ID: <201507251839.34187@ruslandh> (raw)
In-Reply-To: <20150725103337.GA23073@altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 2280 bytes --]
Здравствуйте Dmitry V. Levin
В сообщении от 25 июля 2015 Dmitry V. Levin написал(a):
> On Sat, Jul 25, 2015 at 12:57:01PM +0300, Руслан Хихин wrote:
> > Вот с их помощью на это место и вышел.
>
> A: Because it messes up the order in which people normally
> read text. Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
Вот как мне такое место расшифровать?
==19389== 3 bytes in 1 blocks are still reachable in loss record
1 of 356
==19389== at 0x40294DA: malloc (vg_replace_malloc.c:296)
==19389== by 0x4271B40: strdup (strdup.c:42)
==19389== by 0x47BE19C: PR_NewLogModule (prlog.c:356)
==19389== by 0x47C9A0B: _PR_InitStuff (prinit.c:155)
==19389== by 0x47D2E04: PR_NewLock (ptsynch.c:140)
==19389== by 0x8AF30A3: InstallSignalHandlersMutex
(AsmJSSignalHandlers.cpp:162)
==19389== by 0x8AF30A3:
__static_initialization_and_destruction_0
(AsmJSSignalHandlers.cpp:177)
==19389== by 0x8AF30A3: _GLOBAL__sub_I_AsmJSSignalHandlers.cpp
(AsmJSSignalHandlers.cpp:998)
==19389== by 0x400EFDD: call_init.part.0 (dl-init.c:82)
==19389== by 0x400F0C9: call_init (dl-init.c:34)
==19389== by 0x400F0C9: _dl_init (dl-init.c:130)
==19389== by 0x401310C: dl_open_worker (dl-open.c:566)
==19389== by 0x400EE4D: _dl_catch_error (dl-error.c:177)
==19389== + by 0x4012943: _dl_open (dl-open.c:656)
==19389== by 0x4046CCD: dlopen_doit (dlopen.c:66)
==19389==.
У меня такого файла в исходниках - vg_replace_malloc вообще нет,
а strdup(42) - это неправильное присвоение:
char *s
....
s="";
....
c тем, что-бы дальше передать его в какой-то ....strlen
Вот дословно этот кусок:
PR_IMPLEMENT(char *)
PL_strndup(const char *s, PRUint32 max)
{
char *rv;
size_t l;
if( (const char *)0 == s )
s = "";
l = PL_strnlen(s, max);
rv = (char *)malloc(l+1);
if( (char *)0 == rv ) return rv;
(void)memcpy(rv, s, l);
rv[l] = '\0';
return rv;
}
--
А ещё говорят так (fortune):
<Iambe> you are not a nutcase <Knghtbrd> You obviously don't know
me well enough yet. =>
________________________________________________________________________
С уважением Хихин Руслан
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2015-07-25 15:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-25 3:17 Hihin Ruslan
2015-07-25 9:53 ` Dmitry V. Levin
2015-07-25 9:57 ` Руслан Хихин
2015-07-25 10:33 ` Dmitry V. Levin
2015-07-25 15:05 ` Hihin Ruslan
2015-07-25 15:39 ` Hihin Ruslan [this message]
2015-07-25 15:51 ` Dmitry V. Levin
2015-07-25 17:20 ` Hihin Ruslan
2015-07-27 11:16 ` Хихин Руслан
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=201507251839.34187@ruslandh \
--to=ruslandh@gmail.com \
--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