How to Fix Weird Build Failure with "-release" but OK with "-debug"?

apz28 home at home.com
Wed Jul 21 11:56:05 UTC 2021


On Wednesday, 21 July 2021 at 11:52:39 UTC, apz28 wrote:
> On Wednesday, 21 July 2021 at 04:52:44 UTC, Mathias LANG wrote:
>
>>
>> It seems the compiler is doing extra analysis and seeing that 
>> a null pointer is being dereferenced. Can you provide the code 
>> for "pham\db\db_skdatabase.d" at L138 through 140 ?
>
>     ```d
>     package(pham.db):  // Line# 133
>         final DbReadBuffer acquireSocketReadBuffer(size_t 
> capacity = DbDefaultSize.socketReadBufferLength) nothrow @safe
>         {
>             version (TraceFunction) dgFunctionTrace();
>
>             if (_socketReadBuffer is null)
>                 _socketReadBuffer = 
> createSocketReadBuffer(capacity);
>             return _socketReadBuffer;
>         }
>     ```

The entire codes is available from github
https://github.com/apz28/dlang/blob/main/source/pham/db/db_skdatabase.d#L138


More information about the Digitalmars-d-learn mailing list