How to Fix Weird Build Failure with "-release" but OK with "-debug"?
Steven Schveighoffer
schveiguy at gmail.com
Thu Jul 22 18:56:43 UTC 2021
On 7/22/21 2:38 PM, apz28 wrote:
> On Wednesday, 21 July 2021 at 20:39:54 UTC, Dukc wrote:
>> On Wednesday, 21 July 2021 at 14:15:51 UTC, Steven Schveighoffer wrote:
>>> 2. It's hard for me to see where the null dereference would be in
>>> that function (the `bool` implementation is pretty simple).
>>>
>>
>> DMD complains about dereferences in three different lines. I suspect
>> it's `this` reference that is `null`.
>
> Look like DMD has some bug. If I changed this line
> https://github.com/apz28/dlang/blob/02989b94bfe306d723f2780e010c61f71f873cbe/source/pham/db/db_fbdatabase.d#L148
>
>
> from: auto reader = FbXdrReader(null, response.data);
> to: auto reader = FbXdrReader(fbConnection, response.data);
>
> then the error go away. FbXdrReader constructor allows to accept null
> for that parameter. Is it "safe" means not allow to pass null?
I don't know what an FbConnection is, but it looks like you call
something on it. Your code is immense, and github search really *really*
sucks. So I can't get better information. But if it's a class, and that
is a normal member, it is indeed dereferencing a null pointer.
-Steve
More information about the Digitalmars-d-learn
mailing list