On 1 mars 2011, at 21:11, Mickey Mestel wrote:

> hi all,
> 
>       i've just discovered that the bug is there when compiling with the LLVM 
> compiler 1.6, which comes as a standard compiler with the iOS SDK, and is the 
> direction that Apple is moving towards.
> 
>       the problem is NOT there when compiling with GCC 4.2.
> 
>       the problem is NOT there when compiling with LLVM GCC 4.2, which is 
> described as "GCC 4.2 front-end with LLVM code generator".
> 
>       so for the moment we are going to try going ahead with the LLVM GCC 4.2 
> path.
> 
>       but there is something down in the parser code that LLVM doesn't like, 
> even though it doesn't come up with a warning or error.  we found earlier 
> that when compiling with LLVM, there were issues with the following statement:
> 
>       rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize);
> 
>       in the function SQLITE_PRIVATE int sqlite3BtreeOpen.
> 
>       &pBt->pageSize was a null value when entering the function it was 
> passed to.  we ended up simply doing:
> 
>       u16 *pPageSize = &(pBt->pageSize);  
>       rc = sqlite3PagerSetPagesize(pBt->pPager, pPageSize );
> 
>       so there are some issues with the LLVM compiler.
> 
>       will post again when i see what works, and what path we are going.  
> 
>       it would obviously be nice to find out where in the sqlite code this is 
> happening, but we just don't have the time to devote to that, unfortunately.
> 
>       mickm

I strongly suggest you use Clang (LLVM C compiler) version 2.0. You can 
download it from llvm.org and build it up yourself, or you can simply switch to 
Xcode 4.0 which has it built in - if you have access to it. LLVM 1.6 is getting 
rather old now and plenty of bugs have been fixed in LLVM and Clang since then.

Technically, Clang 1.6 doesn't come with the iOS SDK, it's rather that both 
come with Xcode 3.2.x. Indeed you can download Xcode without the iOS SDK, in 
which case you get the former without the latter.

Also, similar to the Valgrind idea, I strongly suggest that you run your 
project under LLVM static analyzer if you haven't already. It's rather smart 
and it may uncover a bug. Again, the Clang 2.0 version is better than the old 
one.

Finally, if you can reduce the issue to a small project, I'm ready to test it 
here and report what I can find.

Regards,

Jean-Denis Muys

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to