[DGD] xscanf

Raymond Jennings shentino at gmail.com
Fri Feb 10 01:34:10 CET 2017


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
>



More information about the DGD mailing list