Subject Re: Is Firebird Rock Solid?
Author Adam
--- In firebird-support@yahoogroups.com, Nando Dessena <nando@d...>
wrote:
> David,
>
> D> With embedded, an app shares the memory space with the database
server.
> D> Certain types of memory allocation and pointer bugs in the
application
> D> may overwrite memory that "belongs" to the embedded server. The
problem
> D> is the application's, not the server's. The embedded server is
impacted
> D> by something that your application does.
>
> it should be noted that a database corrupted for this reason has yet
> to be seen. The Firebird engine tends to detect problems in the
memory
> structures and shut down without writing the problematic structures
to
> disk.
>
> Also, the very same potential problems apply when you use UDFs, yet
I
> don't see people discouraging the use of UDFs as frequently as they
do
> with fbembed.
>
> Ciao
> --
> Nando Dessena

A very good point Nando!

Most languages are tending away from pointers because as Alan put it,
if you go "AWOL", you risk damaging your in memory structures.
Depending on how you go AWOL, I imagine it would be hard enough to
hit within your applications memory space. Hit outside your memory
space and you should get an AV from the OS. You would nearly need to
carefully craft a set of AWOL pointer operations to prevent the
server from shutting itself down :)

I have never been tempted to use an unsafe pointer based procedure
inside a UDF, they tend to be simple conversion routines, well simple
in Delphi but not Firebird or I wouldn't have written it in the first
place.

Adam