[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SOLVED: gcc 2.95.2 dies with a sig 11, internal compiler error
- To: <linux-il(at-nospam)linux.org.il>
- Subject: SOLVED: gcc 2.95.2 dies with a sig 11, internal compiler error
- From: mulix <mulix(at-nospam)actcom.co.il>
- Date: Wed, 5 Sep 2001 16:41:23 +0300 (IDT)
- Cc: <R.E.Wolff(at-nospam)BitWizard.nl>, st-hackers <syscalltrack-hackers(at-nospam)lists.sourceforge.net>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <Pine.LNX.4.33.0109050519320.26851-100000@alhambra.merseine.nu>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
[replying to my own mail is bad form, i know, but this is interesting in
a morbid sort of way]
On Wed, 5 Sep 2001, mulix wrote:
[gcc 2.95.2 dies with an internal compiler error]
> any ideas on how to debug this further?
by finding the smallest possible example that exhibits this bug, of
course.
in the syscalltrack, for each system call, we produce code that looks
like this:
/* stub for the 'open' (5) syscall */
asmlinkage static int
stub_syscall_5(const char* pathname, int flags, mode_t mode) {
typedef asmlinkage int
(*stub_func_5)(const char* pathname, int flags, mode_t mode);
stub_func_5 func;
note the 'asmlinkage', in the function prototype and in the function
pointer tyepdef. removing the 'asmlinkage' from the function pointer
typedef solves my problem.
[very technical explanation follows, enter at your own peril]
'asmlinkage' is a kernel macro which exapnds on i386 to
__attribute__ ((regparm(0)))
this tells the compiler that the function should only find its arguments
on the stack and NOT in registers (see
http://kernelnewbies.org/faq/index.php3#asmlinkage.xml for the full
explananation). the gcc manual also specifies that this attribute is
only valid for functions (see
http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC84). obviously,
dumping core just because i applied a function attribute to a type is
not the most user friendly thing the compiler could do, but i forgive
it.
now, however, the real answer remains - can i trust on the function
pointer receiving all of its arguments on the stack when its function
is called? and if not, how do i force gcc to do that?
--
mulix
http://www.advogato.com/person/mulix
linux/reboot.h: #define LINUX_REBOOT_MAGIC1 0xfee1dead
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il