mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@inai.de>
To: "long.wanglong" <long.wanglong@huawei.com>
Cc: torvalds@linux-foundation.org, jay.foad@gmail.com,
	cwhuang@android-x86.org, akpm@linux-foundation.org,
	kirill.shutemov@linux.intel.com, riel@redhat.com,
	sasha.levin@oracle.com, Michal Hocko <mhocko@suse.cz>,
	dave@stgolabs.net, koct9i@gmail.com, luto@amacapital.net,
	pfeiner@google.com, dh.herrmann@gmail.com, vishnu.ps@samsung.com,
	linux-mm@kvack.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Wang Kai <morgan.wang@huawei.com>,
	peifeiyue <peifeiyue@huawei.com>,
	linux-arch@vger.kernel.org
Subject: Re: [RFC] kernel random segmentation fault?
Date: Wed, 6 May 2015 12:57:08 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.20.1505061255360.8975@nerf40.vanv.qr> (raw)
In-Reply-To: <55498EB0.3080904@huawei.com>


On Wednesday 2015-05-06 05:46, long.wanglong wrote:
>
>int main(int argc, char** argv)
>{
>    rlim.rlim_cur=20 MB;
>    rlim.rlim_max=20 MB;
>    ret = setrlimit(RLIMIT_AS, &rlim);
>    [...]
>    char tmp[20 MB];
>    for (i = 0; i < 20 MB; i++)
>        tmp[i]=1;

if tmp already takes 20 MB, where will the remainder of the program find
space if you only allow for 20 MB? This is bound to fail under normal
considerations.

  reply	other threads:[~2015-05-06 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1430882810-225406-1-git-send-email-long.wanglong@huawei.com>
2015-05-06  3:46 ` long.wanglong
2015-05-06 10:57   ` Jan Engelhardt [this message]
     [not found] <0b8901d087d4$eafcd8c0$c0f68a40$@alibaba-inc.com>
2015-05-06  8:20 ` Hillf Danton
2015-05-06  9:22   ` long.wanglong

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=alpine.LSU.2.20.1505061255360.8975@nerf40.vanv.qr \
    --to=jengelh@inai.de \
    --cc=akpm@linux-foundation.org \
    --cc=cwhuang@android-x86.org \
    --cc=dave@stgolabs.net \
    --cc=dh.herrmann@gmail.com \
    --cc=jay.foad@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=koct9i@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=long.wanglong@huawei.com \
    --cc=luto@amacapital.net \
    --cc=mhocko@suse.cz \
    --cc=morgan.wang@huawei.com \
    --cc=peifeiyue@huawei.com \
    --cc=pfeiner@google.com \
    --cc=riel@redhat.com \
    --cc=sasha.levin@oracle.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vishnu.ps@samsung.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®