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

Steven Schveighoffer schveiguy at gmail.com
Fri Jul 23 20:21:52 UTC 2021


On 7/23/21 3:30 PM, apz28 wrote:
> On Friday, 23 July 2021 at 18:44:47 UTC, Steven Schveighoffer wrote:
>> On 7/22/21 7:43 PM, apz28 wrote:
>>
> 
>> In any case, it's possible that fbConnection being null does not mean 
>> a null dereference, but I'd have to see the class itself. I'm 
>> surprised if you don't get a null dereference in non-release mode, 
>> unless this code is never actually called.
>>
> 
> The -debug build with passing unit-tests so no problem there.
> The -release build is having problem. After make change to accommodate 
> it, it takes forever to build. I started it yesterday 11AM and it is 
> still compiling now (more than a day already.) It takes a full 100% core 
> and peek memory usage is 2.2GB. The hard-drive is SSD

That is a separate problem. That build is hung, and you likely have 
found a bug in the compiler. I have never seen a build last more than a 
few minutes at the most.

If the code you posted is not crashing with a segfault, then it's 
possible there is a code generation issue. I still believe you have your 
check backwards.

-Steve


More information about the Digitalmars-d-learn mailing list