This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/41929] 64-bit null_pointer_deref1 gnat.dg test consumes all available memory
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2009 13:12:57 -0000
- Subject: [Bug ada/41929] 64-bit null_pointer_deref1 gnat.dg test consumes all available memory
- References: <bug-41929-279@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from rguenther at suse dot de 2009-11-04 13:12 -------
Subject: Re: 64-bit null_pointer_deref1 gnat.dg test consumes
all available memory
On Wed, 4 Nov 2009, ebotcazou at gcc dot gnu dot org wrote:
> ------- Comment #5 from ebotcazou at gcc dot gnu dot org 2009-11-04 11:57 -------
> > Running target unix//-m32
> > FAIL: gnat.dg/null_pointer_deref1.adb execution test
> >
> > the 64bit variant passes.
> >
> > the log just states
> >
> > raised STORAGE_ERROR : stack overflow (or erroneous memory access)
>
> OK, thanks for the clarification. Which kernel do you run? Does the following
> patch help?
I run 2.6.16.42-0.6-smp, that is some old SLES10 kernel.
I'll test if the patch helps.
Richard.
> Index: config/i386/linux-unwind.h
> ===================================================================
> --- config/i386/linux-unwind.h (revision 153778)
> +++ config/i386/linux-unwind.h (working copy)
> @@ -172,6 +172,25 @@ x86_fallback_frame_state (struct _Unwind
> fs->signal_frame = 1;
> return _URC_NO_REASON;
> }
> +
> +#define MD_FROB_UPDATE_CONTEXT x86_frob_update_context
> +
> +/* Fix up for kernels that have vDSO, but don't have S flag in it. */
> +
> +static void
> +x86_frob_update_context (struct _Unwind_Context *context,
> + _Unwind_FrameState *fs ATTRIBUTE_UNUSED)
> +{
> + unsigned char *pc = context->ra;
> +
> + /* movl $__NR_rt_sigreturn,%eax ; {int $0x80 | syscall} */
> + if (*(unsigned char *)(pc+0) == 0xb8
> + && *(unsigned int *)(pc+1) == 173
> + && (*(unsigned short *)(pc+5) == 0x80cd
> + || *(unsigned short *)(pc+5) == 0x050f))
> + _Unwind_SetSignalFrame (context, 1);
> +}
> +
> #endif /* not glibc 2.0 */
> #endif /* ifdef __x86_64__ */
> #endif /* ifdef inhibit_libc */
>
>
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41929