Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: How do I find/fix unaligned accesses?
@ 1998-12-08 21:13 Christian Groessler
  0 siblings, 0 replies; 15+ messages in thread
From: Christian Groessler @ 1998-12-08 21:13 UTC (permalink / raw)
  To: nbecker; +Cc: ericding, axp-list



>Isn't there a syscall to stop kernel unaligned trap fixup?

The following code I've got from this mail list iirc, but cannot
remember from who it was. Sorry.

This program will spawn a subshell, in which unaligned accessed
generate a bus fault.

------------
/* 28-May-98, chris */


#ifndef __linux__
#include <sys/sysinfo.h>
#else
#include <asm/sysinfo.h>
#include <asm/unistd.h>

static int setsysinfo(unsigned long op, void *buffer, unsigned long size,
                      int *start, void *arg, unsigned long flag)
{
  syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag);
}
#endif

void trap_unaligned(void)
{
  unsigned int buf[2];
  buf[0] = SSIN_UACPROC;
  buf[1] = UAC_SIGBUS | UAC_NOPRINT;
  setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0, 0);
}

int main(int ac)
{
  trap_unaligned();
  printf("creating subshell with SIGBUS setting!\n");
  execl("/bin/bash","/bin/bash",(char *)0);
  return(0); /* not reached */
}
------------




^ permalink raw reply	[flat|nested] 15+ messages in thread
* How do I find/fix unaligned accesses?
@ 1998-12-04 18:25 Eric Ding
  1998-12-04 21:16 ` Oscar Levi
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Eric Ding @ 1998-12-04 18:25 UTC (permalink / raw)
  To: axp-list

Hi all,

I've read the FAQ about unaligned accesses on Alpha Linux.  My question is,
now that I've got a whole log full of errors about unaligned accesses, how
do I go about tracking down the actual place in the code that's causing the
problem?

I see, for example,

    axmain(521): unaligned trap at 0000000120472178: 000000011ffff2f4 2d 2

in /var/log/messages.  Now what?  Help me get Applixware for Linux/Alpha
out the door!  :)

Thanks,
Eric
-- 
Senior Software Engineer / ericding@applix.com               <><
Applix, Inc. / 112 Turnpike Road / Westboro MA 01581-2842


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1998-12-08 21:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-08 21:13 How do I find/fix unaligned accesses? Christian Groessler
  -- strict thread matches above, loose matches on Subject: below --
1998-12-04 18:25 Eric Ding
1998-12-04 21:16 ` Oscar Levi
1998-12-04 21:17 ` nbecker
1998-12-04 21:18 ` Harvey J. Stein
1998-12-04 21:35 ` Rich Payne
1998-12-05  2:29   ` Tom Linden
1998-12-05 16:37     ` Oscar Levi
1998-12-07 23:45     ` Eric Ding
1998-12-08  0:44       ` Richard Hadsell
1998-12-08  1:07       ` Uncle George
1998-12-08  3:58         ` Eric Ding
1998-12-08  7:16           ` Wes Bauske
1998-12-08 11:14           ` Uncle George
1998-12-08 13:04             ` nbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox