[DGD] Bug with function pointers
bart at wotf.org
bart at wotf.org
Thu Feb 23 22:36:32 CET 2017
If a function does not exist, you cannot create a pointer to it.
Since this specific example happens during initialization, dgd aborts. This is
desired behavior. Non essential code should not be called in this initial
stage of booting, and errors in code which runs should indicate a failure to
boot properly. Everything non essential should run later (after a call_out).
If it happens after initialization, ie during a regular compile during normal
operation, it results in a regular runtime error and not in an abort.
Bart.
On Thu, 23 Feb 2017 13:42:52 -0600, Blain wrote
> If function 'foo' does not exist:
> &foo();
> results in:
>
> /usr/System/initd.c, 120: Undefined function foo
> Feb 23 13:41:18 ** Failed to compile "/usr/System/core.c"
> 519 initialize /kernel/sys/driver
> 505 _initialize /kernel/sys/driver
> 337 initd /kernel/sys/rsrcd
> 286 compile_object /kernel/lib/auto (/kernel/sys/rsrcd)
> 241 _compile /kernel/lib/auto (/kernel/sys/rsrcd)
> Feb 23 13:41:18 ** Initialization failed.
> FREE(200d1d7c/28), str.cpp line 49:
> 00 00 00 00 00 00 00 00 10 00 'b 'u 'i 'l 't 'i 'n '/ 'f 'u 'n 'c
> 't 'i 'o 'n ____________________________________________
https://mail.dworkin.nl/mailman/listinfo/dgd
--
http://www.flickr.com/photos/mrobjective/
http://www.om-d.org/
More information about the DGD
mailing list