You are absolutely right.
I can't believe I didn't see that.
Tested with no complaints.

I will also update to latest version as noted.

Thanks!


2013/3/5 Dan Kennedy <danielk1...@gmail.com>

> On 03/05/2013 09:37 PM, Μάριος Φραγκούλης wrote:
>
>> I have not tapped the VVA_ONLY() definition.
>> NDEBUG is included in the compilation options
>> I use. Even if it wasn't included, SQLITE_DEBUG is not
>> defined so SQLite would define NDEBUG in
>> this case (if I understand correctly).
>>
>
> If I understand correctly that's a problem. mem1.zMalloc is
> initialized to zero inside a VVA_ONLY() macro. So if NDEBUG
> is defined mem1.zMalloc will never be initialized.
>
>
>
>
>> It may be of interest that I have tapped some
>> #if and #ifdef because of compiler complaints.
>> For example, a function was called after checking
>> that a compile option was defined, but the function
>> definition itself would happen either way. Thus the compiler
>> complained about unused functions.
>>
>> Also, I had to wrap a couple of assertions with TESTONLY() or
>> VVA_ONLY() (I noticed that this is done elsewhere in the source code)
>> because the compiler complained about
>> undeclared variables. The assertion that fails is not among those.
>>
>> I am using SQLite 3.6.22 .
>>
>> Thanks for taking the time to help me out.
>>
>>
>> 2013/3/5 Dan Kennedy <danielk1...@gmail.com>
>>
>>  On 03/05/2013 07:19 PM, Μάριος Φραγκούλης wrote:
>>>
>>>  Hi All,
>>>>
>>>> I have compiled SQLite as part of a Linux kernel module
>>>> (Linux version 3.2.0.35-generic)
>>>> having set SQLITE_OMIT_FLOATING_POINT,
>>>> SQLITE_THREADSAFE=0, SQLITE_OMIT_LOAD_EXTENSION,
>>>> SQLITE_OMIT_BUILTIN_TEST and NDEBUG.
>>>> I have configured SQLite to operate in-memory at all times by setting
>>>> :memory: as database name and by turning off the main and temp
>>>> journals.
>>>> SQLite behaves as expected but /var/log/syslog registers
>>>> mem1.zMalloc == 0 assertion failures during queries.
>>>> At the assertion point in sqlite3.c it is documented that mem1 is never
>>>> malloced, hence the assertion. However, browsing the code
>>>> I see various places where zMalloc is indeed set.
>>>>
>>>> Am I missing sth?
>>>> If zMalloc is never malloced, are there any ideas
>>>> about the root cause?
>>>>
>>>>
>>> Did the VVA_ONLY() macro get defined correctly? Was NDEBUG
>>> defined at build time?
>>>
>>> ______________________________****_________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-****bin/mailman/listinfo/sqlite-****users<http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users>
>>> <http://sqlite.org:8080/**cgi-bin/mailman/listinfo/**sqlite-users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
>>> >
>>>
>>>  ______________________________**_________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
>>
>>
> ______________________________**_________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to