qdl icon indicating copy to clipboard operation
qdl copied to clipboard

Sparse image format + Some fixes

Open abozhinov444 opened this issue 6 years ago • 7 comments

abozhinov444 avatar Oct 24 '19 08:10 abozhinov444

I tried this implementation (with valgrind) and I'm seeing this:

==29674== Invalid read of size 8
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==29674== 
==29674== 
==29674== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==29674==  Access not within mapped region at address 0x0
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  If you believe this happened as a result of a stack
==29674==  overflow in your program's main thread (unlikely but
==29674==  possible), you can try to increase the size of the
==29674==  main thread stack using the --main-stacksize= flag.
==29674==  The main thread stack size used in this run was 8388608.
==29674== 
...

blenk92 avatar Oct 29 '19 17:10 blenk92

I tried this implementation (with valgrind) and I'm seeing this:

==29674== Invalid read of size 8
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==29674== 
==29674== 
==29674== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==29674==  Access not within mapped region at address 0x0
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  If you believe this happened as a result of a stack
==29674==  overflow in your program's main thread (unlikely but
==29674==  possible), you can try to increase the size of the
==29674==  main thread stack using the --main-stacksize= flag.
==29674==  The main thread stack size used in this run was 8388608.
==29674== 
...

I am splitting patches, now due to latest review and will address this issue.

abozhinov444 avatar Oct 29 '19 18:10 abozhinov444

Hi Bjorn, i have split all the patches. Also base source is there. Now it is much better. Also i have fixed mentioned above issue.

Regards, Atanas

abozhinov444 avatar Oct 30 '19 07:10 abozhinov444

Hi Bjorn, i have split all the patches. Also base source is there. Now it is much better. Also i have fixed mentioned above issue.

Regards, Atanas

Tried it, seems to work for me now ;-)

blenk92 avatar Oct 30 '19 10:10 blenk92

Thank you, for the feedback.

abozhinov444 avatar Oct 30 '19 11:10 abozhinov444

@abozhinov444 Do you have a chance to rebase onto HEAD ?

obbardc avatar Jun 16 '22 08:06 obbardc

Is this PR getting merged? What's the status?

jwinarske avatar May 09 '23 21:05 jwinarske