From: Javier Olivares <jolivares@gigablast.com>
To: linux-kernel@vger.kernel.org
Subject: Bug Fix for 2GB core limit in 2.4
Date: Tue, 30 May 2006 11:05:13 -0600 [thread overview]
Message-ID: <447C7B49.4010003@gigablast.com> (raw)
We were having problems when running programs that used over 2GB of ram
not being able to generate core files over 2GB, these are some very
simple changes that fixed the problem.
linux-2.4.31/fs/binfmt_elf.c
1024c1024
< static int dump_seek(struct file *file, off_t off)
---
> static int dump_seek(struct file *file, loff_t off)
Changed the function parameter "off" from type "off_t" to "loff_t". The
parameter was truncating the incoming long long type to a long, causing
the seek to fail and kill the dump when off grew above 2GB.
/kernels/2.4.31/linux-2.4.31/fs/exec.c
1151c1151
< file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
---
> file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW |
O_LARGEFILE, 0600);
Included the O_LARGEFILE flag in order to create files over 2GB.
The changes have been running on many Debian systems for a couple of
months. Valid core files just over 3GB have been created without any
problem. I have never submitted anything like this before so please
excuse any lack of proper protocol.
Thank you.
-Javier Olivares
next reply other threads:[~2006-05-30 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-30 17:05 Javier Olivares [this message]
2006-05-30 23:09 ` Bug Fix for 2GB core limit in 2.4 Willy Tarreau
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=447C7B49.4010003@gigablast.com \
--to=jolivares@gigablast.com \
--cc=linux-kernel@vger.kernel.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
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