Null pointer cause to crash

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Null pointer cause to crash

初佳奇
test on macOS Sierra 10.12.6, with SQLite 3.20.0. Detail:
% /tmp/crashes cat crash.sql
PRAGMA empty_result_callbacks=1;
.dump
% /tmp/crashes cat crash.sql |/usr/local/Cellar/sqlite/3.20.0/bin/sqlite3
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
[1]    4726 done                cat crash.sql |
        4727 segmentation fault  /usr/local/Cellar/sqlite/3.20.0/bin/sqlite3
% /tmp/crashes lldb /usr/local/Cellar/sqlite/3.20.0/bin/sqlite3
(lldb) target create "/usr/local/Cellar/sqlite/3.20.0/bin/sqlite3"
Current executable set to '/usr/local/Cellar/sqlite/3.20.0/bin/sqlite3' (x86_64).
(lldb) r --init crash.sql
Process 4736 launched: '/usr/local/Cellar/sqlite/3.20.0/bin/sqlite3' (x86_64)
-- Loading resources from crash.sql
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
Process 4736 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
     frame #0: 0x000000010000eb6a sqlite3`dump_callback + 34
sqlite3`dump_callback:
->  0x10000eb6a <+34>: movq   (%rdx), %r15
    0x10000eb6d <+37>: movq   0x8(%rdx), %r14
     0x10000eb71 <+41>: movq   0x10(%rdx), %r13
     0x10000eb75 <+45>: leaq   0x9b4bd(%rip), %rsi       ; "sqlite_sequence"
(lldb) register read rdx
      rdx = 0x0000000000000000
(lldb) register read r15
      r15 = 0x0000000100016dea  sqlite3`sqlite3_value_text
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
   * frame #0: 0x000000010000eb6a sqlite3`dump_callback + 34
     frame #1: 0x000000010001be40 sqlite3`sqlite3_exec + 653
     frame #2: 0x000000010000d66a sqlite3`run_schema_dump_query + 50
     frame #3: 0x000000010000653b sqlite3`do_meta_command + 10564
     frame #4: 0x000000010000af8c sqlite3`process_input + 534
     frame #5: 0x0000000100002f65 sqlite3`main + 1656
     frame #6: 0x00007fffafbf3235 libdyld.dylib`start + 1
     frame #7: 0x00007fffafbf3235 libdyld.dylib`start + 1
(lldb)
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Null pointer cause to crash

Simon Slavin-3
On 28 Aug 2017, at 3:33am, 初佳奇 <[hidden email]> wrote:

> test on macOS Sierra 10.12.6, with SQLite 3.20.0. Detail:
> % /tmp/crashes cat crash.sql
> PRAGMA empty_result_callbacks=1;
> .dump
> % /tmp/crashes cat crash.sql |/usr/local/Cellar/sqlite/3.20.0/bin/sqlite3
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> [1]    4726 done                cat crash.sql |
>        4727 segmentation fault  /usr/local/Cellar/sqlite/3.20.0/bin/sqlite3

Dear Sir.  Can you please try the same script on the same computer with the version of SQLite in /usr/bin ?

/tmp/crashes cat crash.sql /usr/l/bin/sqlite3

Thank you for your help.

For the dev team: on my Mac, using /usr/bin/sqlite3 it doesn’t crash.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users