> And the reason you couldn't pass Parameters?
Because KeBugCheck expects the array to contain 4 entries, and Parameters isn't guranteed to be that big.
What do you think of the following?
NTSTATUS
NTAPI
ExpSystemErrorHandler(IN NTSTATUS ErrorStatus,
IN ULONG NumberOfParameters,
IN ULONG UnicodeStringParameterMask,
IN PULONG_PTR Parameters,
IN BOOLEAN Shutdown)
{
ULONG_PTR BugCheckParameters[MAXIMUM_HARDERROR_PARAMETERS] = {0, 0, 0, 0};
ULONG i;
/*
* KeBugCheck expects MAXIMUM_HARDERROR_PARAMETERS parameters,
* but we might get called with less, so use a local buffer here.
*/
for (i = 0; i < NumberOfParameters; i++)
{
/* Copy them over */
BugCheckParameters[i] = Parameters[i];
}
/* FIXME: STUB */
KeBugCheckEx(FATAL_UNHANDLED_HARD_ERROR,
ErrorStatus,
(ULONG_PTR)BugCheckParameters,
0,
0);
return STATUS_SUCCESS;
}
> Date: Wed, 30 Sep 2009 18:03:48 -0400
> From: ionucu@videotron.ca
> To: ros-dev@reactos.org
> Subject: Re: [ros-dev] [ros-diffs] [sginsberg] 43241: - KeBugCheckEx expects BugCheckParameter2 to point to an array when the bug code is FATAL_UNHANDLED_HARD_ERROR -- properly stub out ExpSystemErrorHandler so we don't crash in KeBugCheckEx.
>
> And the reason you couldn't pass Parameters?
>
> Best regards,
> Alex Ionescu
>
>
>
> On Wed, Sep 30, 2009 at 2:31 PM, <sginsberg@svn.reactos.org> wrote:
> > Author: sginsberg
> > Date: Wed Sep 30 20:31:26 2009
> > New Revision: 43241
> >
> > URL: http://svn.reactos.org/svn/reactos?rev=43241&view=rev
> > Log:
> > - KeBugCheckEx expects BugCheckParameter2 to point to an array when the bug code is FATAL_UNHANDLED_HARD_ERROR -- properly stub out ExpSystemErrorHandler so we don't crash in KeBugCheckEx.
> >
> > Modified:
> > á átrunk/reactos/ntoskrnl/ex/harderr.c
> >
> > Modified: trunk/reactos/ntoskrnl/ex/harderr.c
> > URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/harderr.c?rev=43241&r1=43240&r2=43241&view=diff
> > ==============================================================================
> > --- trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] (original)
> > +++ trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] Wed Sep 30 20:31:26 2009
> > @@ -58,10 +58,12 @@
> > á á á á á á á á á á á IN PULONG_PTR Parameters,
> > á á á á á á á á á á á IN BOOLEAN Shutdown)
> > á{
> > + á áULONG_PTR Dummy[4] = {0, 0, 0, 0};
> > +
> > á á /* FIXME: STUB */
> > á á KeBugCheckEx(FATAL_UNHANDLED_HARD_ERROR,
> > á á á á á á á á áErrorStatus,
> > - á á á á á á á á 0,
> > + á á á á á á á á (ULONG_PTR)Dummy,
> > á á á á á á á á á0,
> > á á á á á á á á á0);
> > á á return STATUS_SUCCESS;
> >
> >
> >
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev@reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
check out the rest of the Windows Live™.
More than mail–Windows Live™ goes way beyond your inbox.
More than messages