[fpc-pascal] Reproducible code: DLL calling Firebird crashes
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Tue Sep 30 22:05:47 CEST 2014
Marco van de Voort wrote:
> In our previous episode, Sven Barth said:
>> It is indeed true that all units are initialized once the main code block
>> of the library is called, but you are still inside the library
>> initialization initiated by the OS and thus you are subject to its
>> restrictions which in the case of Windows includes not to load any
>> libraries there.
>
> So the obvious question might be if the unit initialization really belongs
> into the library initialization like that.
Assuming that e.g. connecting to a database uses the Dynlibs unit, is
there any way that this could recognise that it was being invoked from
DLL/so initialisation code and raise a "don't try that here" exception?
Reinier: did you get as far as looking in Dynlibs for an error message
immediately after trying to connect to the database?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list