[DGD] xscanf
Raymond Jennings
shentino at gmail.com
Fri Feb 10 03:25:09 CET 2017
Oh, looks like a windows build. Taking off list.
On Thu, Feb 9, 2017 at 5:41 PM, Blain <blain20 at gmail.com> wrote:
> Is this right?:
>
> DEBUG= -g -DDEBUG -ggdb3
>
> ---
> Exception: STATUS_ACCESS_VIOLATION at eip=0042402F
> eax=00000000 ebx=00000010 ecx=00000000 edx=20111822 esi=00000000
> edi=611D9DAE
> ebp=0023B708 esp=0023B6D0
> program=C:\Users\Blain\Data\mud\core\bin\dgd-1.5.5-debug, pid 5348, thread
> main
> cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
> Stack trace:
> Frame Function Args
> 0023B708 0042402F (0023BC58, 0023BC18, 00000008, 0023B734)
> 0023BB68 004702E8 (0023BC58, 00000001, 004AD0FC, 00000000)
> 0023BBC8 00427816 (0023BC58, 2011181D, 0023BC08, 00000000)
> 0023BCC8 0042897B (0023BDB8, 7FA20610, 00000000, 00000004)
> 0023BD28 00427E8F (0023BDB8, 2011B17A, 00000103, 7FA20600)
> 0023BE28 0042897B (0023BEF8, 7FA20638, 00000000, 00000005)
> 0023BE88 00427E8F (0023BEF8, 2011AD53, 0023BEC8, 0040BC66)
> 0023BF68 0042897B (0023C048, 7FA20638, 00000000, 00000005)
> 0023BFC8 00427E8F (0023C048, 2011ACE3, 0023C0B8, 00428A1A)
> 0023C0B8 0042897B (0023C198, 7FA20638, 00000000, 00000005)
> 0023C118 00427E8F (0023C198, 2011B206, 0023C148, 00485319)
> 0023C208 0042897B (0023C2E8, 7FA20638, 00000000, 00000005)
> 0023C268 00427E8F (0023C2E8, 2010F9E5, 0023C2B8, 200C11BC)
> 0023C358 0042897B (0023C588, 7FA20610, 00000000, 00000004)
> 0023C3A8 0042908F (0023C588, 7FA20638, 00000000, 2009DBEA)
> 0023C3E8 00467551 (0023C588, 00000002, 004ACB84, 0048C161)
> End of stack trace (more stack frames may be present)
>
>
> On Thu, Feb 9, 2017 at 6:34 PM, Raymond Jennings <shentino at gmail.com>
> wrote:
>
> > If you haven't been screwing with DGD's source in "warranty voiding"
> ways,
> > get a stack trace of the segfault and send it to dworkin. Recompiling
> DGD
> > with -ggdb3 is probably helpful.
> >
> > "DGD should never crash" (tm).
> >
> > Normally the only exception is an infinite recursion (which a finite
> stack
> > rlimits should catch anyway) so if the ONLY thing changing is dgd's
> version
> > number it's probably a bug in DGD.
> >
> > On Thu, Feb 9, 2017 at 3:37 PM, Blain <blain20 at gmail.com> wrote:
> >
> > > I tested sscanf(str, str, arr...) on a few different versions of DGD
> and
> > it
> > > works on 1.5 and 1.5.1, but breaks on 1.5.2. According to my differ,
> it
> > > seems that sscanf() was rewritten between versions 1.5.1 and 1.5.2. :o)
> > >
> > > On Thu, Feb 9, 2017 at 3:33 PM, Blain <blain20 at gmail.com> wrote:
> > >
> > > > Der. Calling sscanf(str, str, arr...) is segfaulting. I even tried
> it
> > > > with a bare bones klib. (Oh how I hate segfaults.)
> > > >
> > > > On Wed, Aug 12, 2015 at 7:08 PM, Blain <blain20 at gmail.com> wrote:
> > > >
> > > >> Thanks, Felix. I don't feel so dirty now.
> > > >>
> > > >> I'm having a lot of fun coding lately. :)
> > > >> On Aug 10, 2015 11:53 AM, "Felix A. Croes" <felix at dworkin.nl>
> wrote:
> > > >>
> > > >>> Blain <blain20 at gmail.com> wrote:
> > > >>>
> > > >>> > mixed *xscanf(string str, string format)
> > > >>> > {
> > > >>> > array ret;
> > > >>> >
> > > >>> > ret = allocate(50);
> > > >>> > sscanf(str, format, ret...);
> > > >>> > return ret[.. member(ret, null) - 1];
> > > >>> > }
> > > >>> >
> > > >>> > Does this seem to be the best way to handle this? I feel dirty
> > > >>> arbitrarily
> > > >>> > limiting it to 50.
> > > >>>
> > > >>> There is a hard limit of 128 arguments to any function, so you can
> > use
> > > >>> that as your constant and be sure that you are not imposing any
> > > >>> additional
> > > >>> limits.
> > > >>>
> > > >>> Regards,
> > > >>> Felix Croes
> > > >>> ____________________________________________
> > > >>> https://mail.dworkin.nl/mailman/listinfo/dgd
> > > >>
> > > >>
> > > >
> > > ____________________________________________
> > > https://mail.dworkin.nl/mailman/listinfo/dgd
> > >
> > ____________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>
More information about the DGD
mailing list