From: roneng@ca.ibm.com
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] ia64 gcc implementation of alloca
Date: Tue, 06 Jun 2000 22:34:01 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590678205122@msgid-missing> (raw)
Hi,
Has anyone had any problem using alloca, or knows where in the gcc code it
is implemented?
when I run my program get the following error:
Program received signal SIGSEGV, Segmentation fault.
loose (code\x14, fd=6, name=0x9ffffffffff05ca0 "libnss_files.so.2",
realname=0x60000000000115b0 "/lib/libnss_files.so.2", l=0x0,
msg=0x200000000002f880 "cannot read file data") at dl-load.c:642
642 a[0] = fd;
(gdb)
the code around line 642 is the following
__attribute__ ((noreturn))
lose (int code, int fd, const char *name, char *realname, struct link_map
*l,
const char *msg)
{
/* The use of `alloca' here looks ridiculous but it helps. The goal
is to avoid the function from being inlined. There is no official
way to do this so we use this trick. gcc never inlines functions
which use `alloca'. */
int *a = alloca (sizeof (int));
a[0] = fd;
simple testcases of alloca seem to work, so this is probably an
intermittent problem.
Thank you,
Ronen Grosman
- e-mail roneng@ca.ibm.com
next reply other threads:[~2000-06-06 22:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-06 22:34 roneng [this message]
2000-06-07 1:29 ` [Linux-ia64] ia64 gcc implementation of alloca Jim Wilson
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=marc-linux-ia64-105590678205122@msgid-missing \
--to=roneng@ca.ibm.com \
--cc=linux-ia64@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