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

apz28 home at home.com
Wed Jul 21 11:52:39 UTC 2021


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;
         }
     ```


More information about the Digitalmars-d-learn mailing list